C语言中的1个算术运算出错了帮忙解决1下问题

问题描述:

C语言中的1个算术运算出错了帮忙解决1下问题
怎么输出没显示出来只有1段Input the diameter of the tabl这是我的编译器的答案
Input the diameter of the table:6
The circumference is 18.85
The area is 28.27这是书上的答案 这是1个计算圆的周长跟面积的结果
我的书要求支持9899 我用的是VC ++2006编译器 不知道支不支持9899
#include
int main(void)
{
float radius = 0.0f;
float diameter = 0.0f;
float circumference = 0.0f;
float area = 0.0f;
float pi = 3.14159265f;
printf("Input 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;
}
这样也不行 不好摸索 功能还不了够解
1个回答 分类:综合 2014-10-09

问题解答:

我来补答
这个6是你输入的,敲个回车然后才出来后面的结果
 
 
展开全文阅读
剩余:2000
下一页:数学函数值域