Posted by **Shawn** on Tuesday, October 30, 2012 at 10:03pm.

Read two numbers from the keyboard Display the menu options as follows: 1 - computes the sum of two numbers. 2 - computes the difference (first minus second). 3 - computes the product of the two numbers. 4 - if the second number is not zero, computes the quotient (first divided by second). 5 - terminates the program If the code is not equal to 1,2,3,4 or 5 - displays an error message. The program is then to display the two numbers, the integer code and the computed result to the screen. Use CASE structure in this algorithm.

- Programming -
**Greg**, Thursday, November 1, 2012 at 8:46am
int a = 10;

int b = 5;

int total = 0;

printf("%d + %d = %d\n", a, b, total);

printf("%d - %d = %d\n", a, b, total);

printf("%d * %d = %d\n", a, b, total);

printf("%d / %d = %d\n", a, b, total);

/*Without an array*/

if(var == 1)

{

return 1;

}

else if(var == 2)

{

return 1;

}

else if(var == 3)

{

return 1;

}

else if(var == 4)

{

return 1;

}

else if(var == 5)

{

return 1;

}

else

{

return 0;

}

I think that is what you want, This is just simple C code. Nothing special.

## Answer This Question

## Related Questions

- mathematics-Algebra - I think of two whole numbers;the product of the average of...
- program design - Create the logic for a program that continuously prompts a user...
- Programming - Develop a menu-driven program that inputs two numbers and, at the ...
- programming - 1. Develop a menu-driven program that inputs two numbers and, at ...
- computer programming - Develop a menu-driven program that inputs two numbers and...
- computer - Write an algorithm for a program that accepts a set of numbers and ...
- c++ - write a program that reads ten numbers, computes their average and find ...
- c++ - write a program that reads ten numbers, computes their average and find ...
- Math - Algebra - The sum of two numbers is 25. Twice the second plus 4 is equal ...
- C programming - Enter two integers between 1 to 10 3 4 Both numbers are less ...

More Related Questions