Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int choise, a, b, result;
- printf("Enter two numbers:\n");
- scanf("%d %d", &a, &b);
- printf("1. Addition\n");
- printf("2. Subtraction\n");
- printf("3. Multiplication\n");
- printf("4. Division\n");
- printf("Enter your choise\n");
- scanf("%d", &choise);
- if(choise == 1) {
- result = a + b;
- printf("Addition: %d\n", result);
- } else if (choise == 2) {
- result = a - b;
- printf("Subtraction: %d\n", result);
- } else if (choise == 3) {
- result = a * b;
- printf("Multiplication: %d\n", result);
- } else if (choise == 4) {
- result = a / b;
- printf("Quotient: %d\n", result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement