Write a c++ problem to find the area of a rectangle
Answers
Answer:
#include<iostream.h>/*or you can use #include<iostream>
using namespace std; in newer versions*/
#include<conio.h>
int main()
{
int l, b;
cout<<"enter the values of length and breadth;
cin>>l>>b;
cout<<" area of rectangle ="<<(l*:b) ;
getch();
}
Explanation:
HOPE IT HELPS YOU. DO FOLLOW FOR MORE PROGRAMS
Mark me as BRAINLIEST
To write a Program in C++ to find area of Rectangle :
Required Program :
#include <iostream>
using namespace std ;
int main ( )
{
float length , breadth , area ;
cout<< "Enter the length and breadth of Rect. :";
cin>>length>>breadth ;
area = length * breadth ;
cout<<"Area = " <<area<<endl ;
return 0 ;
}
Output :
Enter the length and breadth of Rect. : 12 8
Area = 96
Structure of C++ Program :
// Comment line
#include <iostream>
using namespace std ;
int main ( )
{
........
Body of the Program ;
............
return 0 ;
}