编写程序,从键盘输入两个整数,分别求这两个整数的和。差积。输入格式:
在一-行中给出2个绝对值不超过50000的整数A和B。
输出格式:
在每一行中依次输出A和B的和、差、积。
这个为什么只有部分正确
int . main()
3.
, int-a,b;
scanf("%d%d",&a, &b);printf("%d" ,a+b);
printf("%d",a-b);printf("In%d" ,a*b);return-0;
这么改,供参考:
#include <stdio.h>
int main()
{
long long int a, b;
scanf("%lld%lld", &a, &b);
printf("%lld\n", a + b);
printf("%lld\n", a - b);
printf("%lld", a * b);
return 0;
}