/* write a program to input length & breadth of a room & calcuate & print its area and volume */
#include<stdio.h>
#include<conio.h>
void main()
{
int l,b,a,p;
clrscr();
printf("Enter the lenhth of room:");
scanf("%d",&l);
printf("Enter the breadth of room:");
scanf("%d",&b);
a=l*b,p=2*(l+b);
printf("\nArea= %d",a);
printf("\nPerimeter= %d",p);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int l,b,a,p;
clrscr();
printf("Enter the lenhth of room:");
scanf("%d",&l);
printf("Enter the breadth of room:");
scanf("%d",&b);
a=l*b,p=2*(l+b);
printf("\nArea= %d",a);
printf("\nPerimeter= %d",p);
getch();
}
No comments:
Post a Comment