Adm1n_0v3rride

Calcuator v1.0

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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×