| 6 | using namespace std; |
| 7 | |
| 8 | int main() |
| 9 | { |
| 10 | cout << "\t\tC++ program to Calculate Area of Equilateral Triangle.\n "; |
| 11 | float a, Area; |
| 12 | cout << "Please enter the value for the side of Triangle: "; |
| 13 | cin >> a; |
| 14 | |
| 15 | if (a > 0) { |
| 16 | Area = sqrt(2) * a * a * 0.25; |
| 17 | cout << "The Area of this triangle is " << Area << ";" << endl; |
| 18 | } |
| 19 | else { |
| 20 | cout << "The sides of Triangle cannot be negative numbers ! " << endl; |
| 21 | } |
| 22 | |
| 23 | system("pause"); |
| 24 | return 0; |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected