/* Calculation two integers + * - / % */
/* Input: two integers */
/* Output:
the sam is:
the difference is:
the quotient is:
the remainder is:
*/
#include<stdio.h>
int main()
{
int x,y;
printf("Please Enter two integers:");
scanf("%d%d", &x, &y);
printf("The sam is: %d\n", x+y);
printf("The difference is: %d\n", x-y);
printf("The product is: %d\n", x*y);
printf("The quotient is: %d\n", x/y);
printf("The remainder is: %d\n", x%y);
return 0;
}
计算两数加、减、乘、除、取模
最新推荐文章于 2024-07-13 14:54:21 发布