What is meant by quadrilateral?
What is meant by Rectangle or Parallelogram?
Such a quadrilateral which has four right angles (angle 90 Degree) triangle is called rectangle
Formula: Area of rectangle: height*width
Perimeter of rectangle: 2*(height+width)
C++ program to find the Area and Perimeter of a Rectangle:
#include<iostream>
using namespace std;
int main()
{
int width,height,area,perimeter;
cout<<"Enter Width of Rectangle = ";
cin>>width;
cout<<"Enter Height of Rectangle = ";
cin>>height;
area=height*width;
cout<<"Area of Rectangle ="<<area<<endl;
perimeter=2*(height+width);
cout<<" Perimeter of rectangle are = "<<perimeter<<endl;
return 0;
}
Sample Output:
A shape which has four straight sides is called quadrilateral shape
What is meant by Rectangle or Parallelogram?
Such a quadrilateral which has four right angles (angle 90 Degree) triangle is called rectangle
Formula: Area of rectangle: height*width
Perimeter of rectangle: 2*(height+width)
C++ program to find the Area and Perimeter of a Rectangle:
#include<iostream>
using namespace std;
int main()
{
int width,height,area,perimeter;
cout<<"Enter Width of Rectangle = ";
cin>>width;
cout<<"Enter Height of Rectangle = ";
cin>>height;
area=height*width;
cout<<"Area of Rectangle ="<<area<<endl;
perimeter=2*(height+width);
cout<<" Perimeter of rectangle are = "<<perimeter<<endl;
return 0;
}
Sample Output:
Very nice and helpful
ReplyDeletethankyou
DeleteThanks a lot
DeleteThanks a lot
DeleteThanks Mera Bhai.😀😀
Deletethanks
ReplyDeletethanx life saver
ReplyDeleteLitlle confused on this
ReplyDeleteCan't compile...line 8
ReplyDeleteHow do I run the program?
ReplyDeleteWhich compiler to use?
go to debug and then run
DeleteBut what about when we want to eliminate negative numbers
ReplyDeleteVery helpful, thank you.
ReplyDeletegood
ReplyDeleteThanks a lott
ReplyDeleteThanku..
ReplyDeletei lv u
ReplyDeleteVery nice and help full
ReplyDelete