Description : This program for Calculating area and perimeter of a Rectangle. i think you already know the formula’s to calculate the Area and Perimeter of Rectangle. anyway here is the formula

Rectangle Formula :

Area of Rectangle = b × h. Perimeter of Rectangle = 2(b) + 2(h). where b = breadth, h = height

Program : C program to calculate area and Perimeter of Rectangle :

#include<stdio.h>

int main()

{

float length,breadth,area,perimeter;

printf(“Enter the length of the rectangle:”);

scanf(“%f”,&length);

printf(“Enter the breadth of the rectangle:”);

scanf(“%f”,&breadth);

area = length * breadth;

perimeter =2*(length + breadth);

printf(“Area of the rectangle with length %d and breadth %d is : %f n“,(int)length,(int)breadth,area);

printf(“Perimeter of the rectangle with length %d and breadth %d is : %f n“,(int)length,(int)breadth,perimeter);

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.