Write a c program to find area and perimeter of rectangle
Program:-
#include<stdio.h>
#include<conio.h>
void main()
{
int l, b;
void arearectangle(int,int);
void perimeterrectangle(int,int);
printf("Enter two values \n");
scanf("%d %d",&l, &b);
arearectangle(l,b);
perimeterrectangle(l,b);
getch();
}
void arearectangle(int l, int b)
{
int area;
area=l*b;
printf("%d is area \n ",area);
return area;
}
void perimeterrectangle(int l, int b)
{
int perimeter ;
perimeter=2*(l+b);
printf("%d is perimeter \n",perimeter);
return perimeter ;
}
Comments
Post a Comment