|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <stdio.h>
int main()
{
int m, n;
scanf("%d,%d", &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);
if(n)
{
printf("%d/%d=%d\n", m, n, m / n);
}
else
{
printf("%d/%d=error\n", m, n);
}
return 0;
}
|