#include <stdio.h> #include <stdlib.h> int main(void) { int a, b, c, flag = 0; char ch; while(1) { flag = scanf("%d %c %d", &a, &ch, &b); fflush(stdin); if(flag) { switch(ch) { case '+': { c = a + b; printf("%d\n", c); break; } case '-': { c = a - b; printf("%d\n", c); break; } case '*': { c = a * b; printf("%d\n", c); break; } case '/': { if(b != 0) { c = a / b; printf("%d\n", c); } break; } default: break; } } else break; } return 0; }