Write a c program to compute area and perimeter of a rectangle?
Answers
Answered by
3
int main(){
float length, width, area;
printf("Enter length of Rectangle\n");
scanf("%f", &length);
printf("Enter width of Rectangle\n");
scanf("%f", &width);
/* Area of Rectangle = Length X Width */
area = length * width;
printf("Area of Rectangle : %0.4f\n", area);
getch();
return 0;
}
Program OutputEnter length of Rectangle 6.5 Enter width of Rectangle 5 Area of Rectangle : 32.5000
jpaanshu:
what about you Harshitha
Similar questions