啊哈磊_编程从这里起步
标题:
比如我输入8和2后按回车,运行结果只有8+2=10,其他什么也没有,哪里出错了吗
[打印本页]
作者:
和人
时间:
2022-10-7 15:21
标题:
比如我输入8和2后按回车,运行结果只有8+2=10,其他什么也没有,哪里出错了吗
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c;
scanf("%d%d",&a,&b);
c=a+b;
printf("%d+%d=%d",a,b,c);
c=a-b;
printf("%d-%d=%d",a,b,c);
c=a*b;
printf("%d*%d=%d",a,b,c);
c=a/b;
printf("%d/%d=%d",a,b,c);
system("pause");
return 0;
}
复制代码
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2