WAP to accept length and breadth of a rectangle and display area or perimeteraccording to the user's choice C++
Answers
Answered by
0
#include <iostream>
using namespace std;
int main()
{
float l, w, a;
cout << "Enter the length & width of the rectangle::\n";
cin >> l >> w;
/* Calculate area of rectangle */
a = l * w;
/* Print output */
cout << "\nArea of rectangle = " << a << " units";
return 0;
}
Similar questions