作业帮 > 综合 > 作业

就是先算出SUM再算出S

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/23 20:24:45
就是先算出SUM再算出S
你的功能已经完成了,我不懂你是要什么样子的输入和输出.格式如何.
请你列举清楚.
你是要输入一个,然后一个回车,然后再输入一个,再回车么
#include
void main()
{
int a,b,sum,d,h,s;
printf("please input a:");
scanf("%d",&a);
printf("please input b:");
scanf("%d",&b);
sum = a + b;
printf("the sum of a and b is %d\n",sum);
printf("please input d:");
scanf("%d",&d);
printf("please input h:");
scanf("%d",&h);
s = d * h /2;
printf("the s of d and h is %d\n",s);
}
你要的是这种交互式的结果吗
再问: 对,就是这个,printf("the s of d and h is %d\n",s);是什么意思?我是新手。
再答: printf("一串英语%d",s); \n表示回车