Question #37832

write a programme which prompts the user to enter the four cartesian coordinate corner of the rectangle

Expert's answer

Answer on Question#37832- Programming, C++

1. write a programme which prompts the user to enter the four cartesian coordinate corner of the rectangle.

Solution.


#include <iostream>
using namespace std;
void main()
{
    int x, y;
    for(int i = 1; i <= 4; i++)
    {
        cout << "Enter " << i << " vertex:" << endl;
        cout << "Enter X:" << endl;
        cin >> x;
        cout << "Enter Y:" << endl;
        cin >> y;
    }
    system("pause");
    return;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS