Created
July 10, 2018 02:15
-
-
Save GregoryHlavac/d07860e7d3204960b7a7cfe2bbdb65cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int length, width, area; | |
void welcomeMessage() | |
{ | |
cout << "This program was designed to calculate the area of a triangle.\n" << endl; | |
} | |
int rect_fun() | |
{ | |
area = length * width; | |
cout << "The area of the triangle is " << area << "." << endl; | |
} | |
int main(const char*) | |
{ | |
welcomeMessage(); | |
cout << "Please enter the length of the triangle.\n"; | |
cin >> length; | |
cout << "Please enter the width of the triangle.\n"; | |
cin >> width; | |
rect_fun(); | |
cout << "Have a nice day!!" << endl << endl; | |
system("pause"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment