programming

posted by .

1. Develop a menu-driven program that inputs two numbers and, at the user's option, finds their sum, difference, product, or quotient

  • programming -

    Develop a menu- driven program that inputs two numbers and, at the user’s option, finds their sum, difference, product, or quotient.

  • programming -

    #include <iostream.h>
    #include <conio.h>

    void main()
    {
    clrscr();
    int x = 10;
    int y = 2;
    int sum, difference, product, quotient;
    sum = x + y;
    difference = x - y;
    product = x * y;
    quotient = x / y;
    cout << "The sum of " << x << " & " << y << " is " << sum << "." << endl;
    cout << "The difference of " << x << " & " << "y << is " << difference << "." << endl;
    cout << "The product of " << x << " & " << y << " is " << product << "." << endl;
    cout << "The quotient of " << x << " & " << y << " is " << quotient << "." << endl;
    getch();
    }

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Pseudocode programming

    I need a currency conversion application. It does not have to be written in an actual programming language, just the pseudocode as well as the elements listed below. Complete requirements analysis Design Verification Validation and …
  2. Computer Programming

    Java Programming Question: basically want to keep the user in a loop that displays the menu and requests a user choice again and again until the user enters choice option 0 and exits the program. When Option 1 is chosen, I want to …
  3. Programming

    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 …
  4. programming

    Using Raptor, create a condition loop that will ask the user for input of two numbers. The numbers should be added and the sum displayed. The loop should also ask the user if he or she wishes to enter two more numbers and perform the …
  5. Programming in c++

    Write a program in c++ that inputs a number [1-12] from the user and displays the month. it also asks the user whether he wants to input another number or not, if the user inputs 1 then it again inputs number, if user inputs 0 then …
  6. computer programming

    Develop a menu-driven program that inputs two numbers and, at the user's option, finds their sum, difference, product, or quotient.
  7. Programming

    Develop a menu-driven program that inputs two numbers and, at the user's option, finds their sum, difference, product, or quotient.
  8. Programming concepts

    Develop a menu-driven program that inputs two numbers and, at the user’s option, finds their sum, difference, product, or quotient. top-down modular approach and pseudocode to design a suitable program to solve it. I am having so …
  9. Computer Science/Pseudo Code Python

    Hi, I'm confused about an assignment. I'm not sure what to do and would like some help. An example: Write a program that obtains two integer numbers from the user. It will print out the sum of those numbers. Pseudo code: Prompt user …
  10. Programming

    Design and plan the logic for a program that prompts the user for and allows the user to enter TWO numbers. The program outputs the sum of the two values. Provide declarations.

More Similar Questions