摘要:
1、 #include <stdio.h> int main(void) { float x1 = -0.01; int x2 = 0; int i; for(i = 0; i <= 100; i++) { printf("x = %f x = %f\n", x1 += 0.01, x2++ / 1 阅读全文
摘要:
创建一个程序,输入一个实数作为面积,求面积为该实数的正方形的边长。 #include <stdio.h> #include <math.h> int main(void) { double area; puts("please input the area."); printf("area = ") 阅读全文
摘要:
1、创建一个程序,使用sizeof运算符显示3种浮点型的长度。 3种浮点型: float; double; long double; #include <stdio.h> int main(void) { printf("sizeof(float) = %d\n", sizeof(float)); 阅读全文
摘要:
c语言中<math.h>头文件,计算两点之间的距离。 <math.h>头文件包含基本数学函数的函数原型声明。 1、 #include <stdio.h> #include <math.h> double dist(double x1, double y1, double x2, double y2) 阅读全文