Area and Perimeter of Rectangle

C Program to find Area and Perimeter of Rectangle | C Assignment to find Area and Perimeter of Rectangle




#include
#include
void main()
{
float a,b,l,p;
clrscr();
printf(“enter the l and b value:\n”);
scanf(“%f%f”,&l,&b);
a=l*b;
p=2*(l+b);
printf(“area=%f\n perimeter=%f\n”,a,p);
getch();
}


Output:
enter the l and b value:
6
8
area=48.000000
perimeter=28.000000

1 comment:

  1. write a programme in c to accept n number an array and display the addition of all even number and mutiplication of all odd number

    ReplyDelete