Adm1n_0v3rride

C calcuator written by Adm1n_0v3rride

Jul 15th, 2017
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.86 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. /* More versons will come soon */
  4. int main()
  5. {
  6.     int a;
  7.     int b;
  8.     int mathmaticaloperation;
  9.    
  10.     printf("Welcome to Adm1n_0v3rride's calcuator program v1.0\n");
  11.     printf("Please type the first number: ");
  12.     scanf("%d",&a);
  13.     printf("Please type the secound number please: ");
  14.     scanf("%d",&b);
  15.    
  16.     printf("Please input the number for the mathmatical operation that you are trying to do\n1.addition\n2.subtraction\n3.multiplication\n4.division: ");
  17.     scanf("%d",&mathmaticaloperation);
  18.    
  19.     if(mathmaticaloperation == 1)
  20.     {
  21.         printf("The sum is %d .\n",a + b);
  22.     }
  23.     if(mathmaticaloperation == 2)
  24.     {
  25.         printf("The answer is %d .\n",a - b);
  26.     }
  27.     if(mathmaticaloperation == 3)
  28.     {
  29.         printf("The answer is %d .\n",a * b);
  30.     }
  31.     if(mathmaticaloperation == 4)
  32.     {
  33.         printf("The answer is %d .\n",a / b);
  34.     }
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment