newyen2

Untitled

Sep 15th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(){
  3.     char N;
  4.     int A,B;
  5.     scanf("%d%c%d",&A,&N,&B);
  6.     switch(N) {
  7.         case "+" :
  8.         printf("%d",A+B);
  9.         break;
  10.         case "-" :
  11.         printf("%d",A-B);
  12.         break;
  13.         case "*" :
  14.         printf("%d",A*B);
  15.         break;
  16.         default :
  17.         break;
  18.     };
  19.     return 0;
  20. };
Advertisement
Add Comment
Please, Sign In to add comment