Computer Science, asked by sanjeevraghuvanshi52, 3 days ago

Q. Write a program in C++ to calculate area of rectangle.​

Answers

Answered by ladnomamit1992
1

Explanation:

using namespace std;

int main() {

// Declare Variables

int length, breadth, area;

cout << "Simple C++ Program : Area Of Rectangle\n";

cout << "\nEnter the Length of Rectangle : ";

cin>>length;

cout << "\nEnter the Breadth of Rectangle : ";

cin>>breadth;

area = length * breadth;

cout << "\nArea of Rectangle : " << area;

getch();

return (0);

}

Answered by r27272278
0

#include <iostream>

#include<conio.h>

#include<stdlib.h>

using namespace std;

int main() {

// Declare Variables

int length, breadth, area;

cout << "Simple C++ Program : Area Of Rectangle\n";

cout << "\nEnter the Length of Rectangle : ";

cin>>length;

cout << "\nEnter the Breadth of Rectangle : ";

cin>>breadth;

area = length * breadth;

cout << "\nArea of Rectangle : " << area;

getch();

return (0);

}

Output :

Enter the Length of Rectangle : 5

Enter the Breadth of Rectangle : 3

Area of Rectangle : 15

Similar questions