大神帮看是不是有问题,今天想了一天了
c4droid吧
全部回复
仅看楼主
level 9
舞动精灵 楼主
#include <stdio.h>
int main(void)
{
float radius = 0.0f;/*桌子的半径*/
float diameter = 0.0f;/*表的直径*/
float circumference = 0.0f;/*桌子的周长*/
float area = 0.0f;/*一个圆的面积*/
float Pi = 3.14159265f;
printf("Inpud the diameter of the table:");
scanf("%f", & diameter);/*从键盘上读取直径*/
radius = diameter/2.0f;/*计算半径*/
circumference = 2.0f*Pi*radius;/*计算周长*/
area=Pi*radius*radius;/*计算面积*/
printf("\nThe circumference is %.2f ",circumference);
printf("\nThe area is %.2f\n",area);
return 0 ;
}
/*npud the diameter of the table:6*/
/*The circumference is 18.85*/
/*The area is 28.27*/
刚到第显示第一个printf,下面2个printf就没有显示了,用是C4编译的
2015年08月24日 23点08分 1
level 13
哇哦,这么多注释,都是楼主打的吗,
2015年08月25日 00点08分 2
level 13
虽然不知道怎么回事,但是楼主输入直径了没,,,
2015年08月25日 00点08分 3
level 9
截图比较好解读
2015年08月25日 07点08分 4
level 8
6666666666666666
2015年08月26日 12点08分 5
level 9
scanf("%f", & diameter);/*从键盘上读取直径*/
你输入直径并回车了吗?
2015年08月28日 02点08分 6
输入那个都可以吗?
2015年08月28日 16点08分
level 9
0.0f是什么?
2015年08月28日 03点08分 7
level 9
舞动精灵 楼主
这个你都不懂啊!0.0f是浮点类型
2015年08月28日 16点08分 8
[黑线]我只听说过%.xf/lf
2015年08月29日 10点08分
level 3
复制你的程序,运行后的结果
2015年08月28日 16点08分 9
你是随便输入直径啊!
2015年08月28日 16点08分
level 9
既然C4支持中文,为何输入蛋疼的英文嘞?
2015年08月29日 10点08分 10
1