求大神帮忙,用最基础的解决一下,良辰必有重谢

如题所述

#include <stdio.h>

int main(void)
{
double a, b, c;
printf("Input three number: ");
scanf("%lf %lf %lf", &a, &b, &c);
printf("The mea is %lf.\n", (a+b+c)/3.0);
printf("The product is %lf.\n", a*b*c);

return 0;
}追问

为什么要用那个double哟,宝宝有点搞不懂

为什么我用vc时可以用,等到退出后,再用编写好的程序时,把数字一输进去,当按下Enter键时,就退出来了,每一次都这样

温馨提示:内容为网友见解,仅供参考
第1个回答  2015-10-20
#include<stdio.h>
void main()
{
int a,b,c,d;
printf("Please input 3 numbers,example,[1,2,3]:\n");
scanf("%d,%d,%d",&a,&b,&c);
d=(a+b+c)/3;
printf("The average is %d.\n", d);
}
输入方式:
如1,2,3
则输出2

望采纳!
第2个回答  2015-10-20
很好做,只是你没看书追问

宝宝不会,求帮忙,宝宝重谢

追答

现在在外面看电影,可以晚些时候发给你吗?

追问

你帮我做计算平均数那个吧,到时候我找你。

追答

好的

追问

谢谢咯

第3个回答  2015-10-20

追问

谢谢咯

不过有人在你前面,不好意思哈

追答

客气,字丑

追问

真的不好意思

麻烦你咯😁

相似回答