Saturday, 6 July 2013

C++ programe to find the area of Rectangle

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

void main()
{
    float l ;
    float w ;
    clrscr();   
    cout<<"\nFinding Area of Rectangle";
    cout<<"\n---------------------------";
    cout<<"\nEnter the value of Length (then press ENTER key): ";
    cin>>l;
    cout<<"Enter the value of Width (then press ENTER key) : ";
    cin>>w;
    cout<<"\n\nFormula:";
    cout<<"\nArea of Rectangle = Length * Width";
    cout<<"\n\nResult:";
    cout<<"\nArea of Rectangle = "<<l*w;
    cout<<"\n---------------------------";
    cout<<"\n\n\nPress any key to Exit";
    getche() ;
}

No comments:

Post a Comment