Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int base = 15;
- float height = 8.82;
- float area2 = (.5*base*height);
- int s1 = 15;
- int s2 = 17;
- int s3 = 15;
- int perimeter2 = s1 + s2 + s3;
- cout << " This program calculates triangle area and perimeter." << endl;
- cout << "The triangle's perimeter is " << perimeter2 << "and the area is " << area2 << "." << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement