Announcement:

This is just the beginning of this blog, please don't copy any of my posts.

Friday, 6 September 2013

C Program to Find the Area and Perimeter of Rectangle and Square [With Output]

Here is a simple program to find the area of the rectangle and square. Also the below program will find the perimeter of the rectangle.
Program

  #include<stdio.h>
  #include<conio.h>
  void main()
   {
    int l,,area,peri,sqr,side;
    clrscr();
    printf("\nEnter the length, width of rectangle & side of Square");
    scanf("%d%d%d",&l,&b,&side);
    area=l*b;
    peri=2*l+2*b;
    sqr=4*sqr;
    printf("\nArea of Rectangle=%d",area);
    printf("\n Perimeter=%d",peri);
    printf("\nSquare=%d",sqr);
    getch();
    }

Output:

Enter the length, width of rectangle & side of Square
3
5
6
Area of rectangle=15
Perimeter=16
Square=24

Share it Please

Pankaj Gaikar

Pankaj Gaikar is a professional blogger from Pune, India who writes on Technology, Android, Gadgets, social media and latest tech updates at Punk Tech , Being Android & Shake The Tech . Email me HERE

0 comments :

Post a Comment

Copyright @ 2013 Pune University Bachelor of Engineering . Designed by Pankaj Gaikar | Love for The Tricks Machine