C语言中的1个算术运算出错了帮忙解决1下问题怎么输出没显示出来只有1段Input the diameter of the tabl这是我的编译器的答案Input the diameter of the table:6The circumference is 18.85 The area is 28.27这是书上的
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/24 11:39:58
![C语言中的1个算术运算出错了帮忙解决1下问题怎么输出没显示出来只有1段Input the diameter of the tabl这是我的编译器的答案Input the diameter of the table:6The circumference is 18.85 The area is 28.27这是书上的](/uploads/image/z/6838177-49-7.jpg?t=C%E8%AF%AD%E8%A8%80%E4%B8%AD%E7%9A%841%E4%B8%AA%E7%AE%97%E6%9C%AF%E8%BF%90%E7%AE%97%E5%87%BA%E9%94%99%E4%BA%86%E5%B8%AE%E5%BF%99%E8%A7%A3%E5%86%B31%E4%B8%8B%E9%97%AE%E9%A2%98%E6%80%8E%E4%B9%88%E8%BE%93%E5%87%BA%E6%B2%A1%E6%98%BE%E7%A4%BA%E5%87%BA%E6%9D%A5%E5%8F%AA%E6%9C%891%E6%AE%B5Input+the+diameter+of+the+tabl%E8%BF%99%E6%98%AF%E6%88%91%E7%9A%84%E7%BC%96%E8%AF%91%E5%99%A8%E7%9A%84%E7%AD%94%E6%A1%88Input+the+diameter+of+the+table%3A6The+circumference+is+18.85+The+area+is+28.27%E8%BF%99%E6%98%AF%E4%B9%A6%E4%B8%8A%E7%9A%84)
C语言中的1个算术运算出错了帮忙解决1下问题怎么输出没显示出来只有1段Input the diameter of the tabl这是我的编译器的答案Input the diameter of the table:6The circumference is 18.85 The area is 28.27这是书上的
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;
}
这样也不行 不好摸索 功能还不了够解
C语言中的1个算术运算出错了帮忙解决1下问题怎么输出没显示出来只有1段Input the diameter of the tabl这是我的编译器的答案Input the diameter of the table:6The circumference is 18.85 The area is 28.27这是书上的
这个6是你输入的,敲个回车然后才出来后面的结果