C program to find area and perimeter of rectangle

      No Comments on C program to find area and perimeter of rectangle
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z1,z2;
clrscr();
printf("Enter height: ");
scanf("%d",&x);
printf("Enter width: ");
scanf("%d",&y);
z1=x*y;
z2=2*(x+y);
printf("Area of rectangle is: %d\n",z1);
printf("Perimeter of rectangle is: %d",z2);
getch();
}

OUTPUT:-

Leave a Reply

Your email address will not be published. Required fields are marked *