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
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编译的
