Q2-4-2

j20252119 · updated April 28, 2026
/*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

Comments

Please sign up or log in to contribute to the discussion.