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