Computer Science, asked by nasreenjang2002, 2 days ago

write a c++ program to find out the area of a rectangle and display the result on the screen

Answers

Answered by sorathiya
1

Answer :

program:-

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 whyIMLazy
0

Answer:

#include <iostream>

int main()

{

float length=10, breadth=20, area;

area= length*breadth;

cout<< "the area is %f" << area;

return 0;

}

Explanation:

there's no need to panic, copy-paste and run the above program.

you can change the values of length and breadth as per your needs.

Similar questions