Q2-4-2
C
/*Q2-4-2*/
#include <stdio.h>
int main()
{
int m,n;
scanf("%d%d",&m,&n);
printf("m=%d\n",m);
printf("n=%d\n",n);
printf("%d + %d = %d\n", m, n, m+n);
printf("%d - %d = %d\n", m, n, m-n);
printf("%d × %d = %d\n", m, n, m*n);
printf("%d ÷ %d = %d\n", m, n, m/n);
printf("%d ÷ %dの余り = %d\n", m, n, m%n);
return 0;
}
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.