Saturday, 10 December 2011

Write a program to find out area and parameter in c

#include
#include
main()
{
int l,w,a,p;
clrscr();
printf("\n ENTER LENTH:-");
scanf("%d",&l);
printf("\n ENTER WEIGHT:-");
scanf("%d",&w);
a=l*w;
printf("\n area=%d",a);
p=2*(l+w);
printf("\n perameter=%d",p);
getch();
}

OUTPUT
ENTER LENTH:10
ENTER WEIGHT:5
Area=50
Parameter =30

No comments:

Post a Comment