C program to enter length and breadth of a rectangle and find its perimeter. 






 /**

 * to enter length and breadth of a rectangle and find its perimeter.


 */


#include <stdio.h>

int main()

{

    float length, width, perimeter;

    printf("Enter length of the rectangle: ");

    scanf("%f", &length);

    printf("Enter width of the rectangle: ");

    scanf("%f", &width);

    perimeter = 2 * (length + width);

    printf("Perimeter of rectangle = %f units ", perimeter);

  

}



                                                OUT PUT

                                    Enter length of the rectangle: 5

                                    Enter width of the rectangle: 6

                                    Perimeter of rectangle = 22.000000 units

                                    --------------------------------


*****************************************

                                                   

 Related Question



 
➤Write a C program to enter length and breadth of a rectangle and find its area.

➤Write a C program to enter radius of a circle and find its diameter, circumference and area. 

➤Write a C program to enter length in centimeter and convert it into meter and kilometer

 ➤Write a C program to enter temperature in Celsius and convert it into Fahrenheit

➤Write a C program to enter temperature in Fahrenheit and convert to Celsius 

Write a C program to convert days into years, weeks and days.
*********************************************