Post a New Question

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();
    }

Answer This Question

First Name
School Subject
Your Answer

Related Questions

More Related Questions

Post a New Question