Question: Write a Triangle program in C++ which promts the user to input the X and Y coordinates(X1 Y1, X2 Y2), the program should calulates the
Write a Triangle program in C++ which promts the user to input the X and Y coordinates(X1 Y1, X2 Y2), the program should calulates the area, and the perimeter of the triangle and also add a print function to print the (area and perimeter onto the screen). After Success, add to the triangle a Grid that draws out the Shape of the traiangle using the Coordinates.
Hint:
int Menu()
{
int choice1;
cout << " 1. Enter the coordinates of the triangle: " << endl;
cout << "2. Print out the perimeter: " << endl;
cout << "3. Print out the area: " << endl;
cout << "4. Draw the triangle: " << endl;
cout << "6. Exit the program" << endl;
cout << "Enter your choice: ";
cin >> choice1;
return choice1;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
