The numbers and displaying

The following program is designed to input two numbers and output their sum. It asks the user if he/she would like to run the program. If the answer is Y or y, it prompts the user to enter two numbers. After adding the numbers and displaying the results, it again asks the user if he/she would like to add more numbers. However, the program fails to do so. Correct the program so that it works properly.   (2, 3)

#include

#include

using namespace std;

int main()

    char response;

    double num1;

    double num2;

    cout < “this=”” program=”” adds=”” two=”” numbers.”=””><>

    cout < “would=”” you=”” like=”” to=”” run=”” the=”” program:=”” (y/y)=””>

    cin >> response;    cout <>

    cout < fixed=””>< showpoint=””><>

    while (response == ‘Y’ && response == ‘y’)   

        cout < “enter=”” two=”” numbers:=””>

        cin >> num1 >> num2;

        cout <>

        cout < num1=””>< “=”” +=”” “=””>< num2=””>

        cout << ” would=”” you=”” like=”” to=”” add=”” again:=”” (y/y)=””>

        cin >> response;        cout < endl;   =””>

    return 0;

Posted in Uncategorized

Leave a Reply