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