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
 mathematicsAlgebra  I think of two whole numbers;the product of the average of...
 Math  Algebra  The sum of two numbers is 25. Twice the second plus 4 is equal ...
 Math 8th grade  I NEED THESE IN ALGEBRAIC EXPRESSION!! The larger of two sums ...
 Programming  Develop a menudriven program that inputs two numbers and, at the ...
 programming  1. Develop a menudriven program that inputs two numbers and, at ...
 C programming  Enter two integers between 1 to 10 3 4 Both numbers are less ...
 Math  When factoring a trinomial that is in the format Ax^2 + Bx + C, the ...
 program design  Create the logic for a program that continuously prompts a user...
 computer programming  Develop a menudriven program that inputs two numbers and...
 math  the difference between the sum of the two numbers and the difference of ...
More Related Questions