#include
main()
{
int a,b,c;
printf("请输入两个整数:");
scanf("%d%d",&a,&b);
c=a+b;
printf("这两个数的和是:\n%d+%d=%d",a,b,c);
}
#include
main()
{
int a,b,c;
printf("请输入两个整数:");
scanf("%d%d",&a,&b);
c=a+b;
printf("这两个数的和是:\n%d+%d=%d",a,b,c);
}
#include
void main()
{
int a,b,sum;
a=123;b=456;
sum=a+b;
printf("sum is %d\n",sum);
}
完成
4 5
这两个数的和是:
4+5=9
Press any key to continue
#include
main()
{
int a,b;
scanf("%d%d",&a,&b);
printf("这两个数的和是:\n%d+%d=%d\n",a,b,a+b);
}
有问题请追问 满意记得采纳
#include
void main()
{
int a,b;
int sum;
printf("请输入两个整数:\n");
scanf("%d%d",&a,&b);
sum=a+b;
printf("这两个数的和是:%d+%d=%d\n",a,b,sum);
}
#include
main()
{
int a,b;
scanf("%d%d",&a,&b);
printf("这两个数的和是:\n%d+%d=%d",a,b,(a+b));
}