adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Calculate area and perimeter of the rectangle in C++ program

Calculate area and perimeter of the rectangle



#include<iostream.h>
#include<conio.h>
 void main()
  {
  int l,b;
  clrscr();
  cout<<"Enter lenght & breadth:-";
  cin>>l>>b;
  float area=l*b;
  float pm=2*(l+b);
  cout<<"Area of rectangle="<<area;
  cout<<"\nPerimeter of rectangle="<<pm;
  getch();
  }
Output:-







Post a Comment

0 Comments