<math.h>
头文件中。double fmod(double x, double y);
#include <stdio.h> #include <math.h> int main() { double x = 10.3; double y = 3.5; double result = fmod(x, y); printf("The remainder of %.2f divided by %.2f is %.2f\n", x, y, result); return 0; }输出结果为:
The remainder of 10.30 divided by 3.50 is 3.30
本文链接:http://task.lmcjl.com/news/16723.html