这样可以编计算器吗
#include<stdio.h>main(){int a,b,c,d,e,f,g,h,sum;scanf("%d %d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g,&h);sum=a+b;sum=a+b+c;sum=a+b+c+d;sum=a+b... 展开
其他答案
变量可以先初始化一下int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,sum=0;scanf("%d %d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g,&h);sum=a+b+c+d+e+f+g+h;printf("sum is %d\n",sum);system("puase&qu 展开
2010-12-07 00:56
来自北京市
赞(0)点赞赞(0)举报
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。




