C Program to Find Perimeter of Rectangle
Write C Program to Find the Perimeter of the Rectangle
//Write a C Program to Find Perimeter of Rectangle #include <stdio.h> int main() { float length, breadth, Perimeter; printf("Enter the length :--> "); scanf("%f", &length); printf("Enter the breadth :--> "); scanf("%f", &breadth); //Formula to find the perimeter of Rectangle Perimeter = 2 * (length + breadth); printf("Perimeter of Rectangle :--> %0.2f\n", Perimeter); return 0; }
Output:
Enter the length :--> 20
Enter the breadth :--> 10
Perimeter of Rectangle :--> 60.00