Program to find area of rectangle


Prev Tutorial Next Tutorial

Find area of rectangle program in C++

For calculate area and parameter of rectangle you need length and breath of rectangle and apply below formula;

Formula

Area of Rectangle = length*breath;
Parameter of Rectangle = 2*(length+breath);

program to find area of rectangle

#include<iostream.h>
#include<conio.h>

void main()
{
int length,breath,area_rec=0,parameter=0;
clrscr();
cout<<"Enter Length and Breath of Rectangle: ";
cin>>length>>breath;
area_rec=length*breath;
parameter=2*(length+breath);
cout<<"\nArea of Ractangle: "cout<<area_rec;
cout<<"\nParameters of Rectangle: "cout<<parameter;
getch();
}

Output

Enter Length and Breath of Rectangle: 5 4
Area of Rectangle: 20
Parameters of Ractangle: 18

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements