报错:[Error] invalid operands to binary * (have 'int *' and 'int')
题目:输入两个整数num1和num2,请你设计一个程序,计算并输出它们的和、差、积、整数商及余数。
代码如下:
#include<stdio.h>
#include<math.h>
int main()
{
int num1;
int num2;
scanf("%d %d",&num1,&num2);
printf("%d %d %d %d %d",&num1+num2,&num1-num2,&num1*num2,&num1/num2,&num1%num2);
return 0 ;
}
求助各路大佬我哪儿写错了{:10_266:} #include<stdio.h>
#include<math.h>
int main()
{
int num1;
int num2;
scanf("%d %d",&num1,&num2);
printf("%d %d %d %d %d",num1+num2,num1-num2,num1*num2,num1/num2,num1%num2);
return 0 ;
}
输出那里不用取地址符,跟上一个问题一样 谢谢您哈哈哈哈哈又是我{:10_264:}
页:
[1]