WACP to find area and perimeter of a rectangle.

1 year ago
C Programming

/* program to find area and perimeter of a rectangle */ #include<stdio.h>

int main()

{

float length, breadth, area, perimeter; printf(“Enter length and breadth\n”); scanf(“%f%f”,&length, &breadth); area = length * breadth;

perimeter = 2 * (length + breadth);

printf(“Area of rectangle = %f\n”,area); printf(“Perimeter of rectangle = %f\n”,perimeter); return 0;

}

Sanisha Maharjan
Jan 20, 2022
More related questions

Questions Bank

View all Questions

Top