Skip to main content

Posts

Showing posts with the label 3. Write a C program to enter length and breadth of a rectangle and find its perimeter.

ads1

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

3. Write a C program to enter length and breadth of a rectangle and find its perimeter. Solution :-  #include<conio.h> #include<stdio.h> void main() {     clrscr();     float length,breadth,peri;     printf("Enter the Length of a rectangle :-");     scanf("%f",&length);     printf("Enter the Breadth of a rectangle :- ");     scanf("%f",&breadth);     peri = 2*(length + breadth);     printf("The Perimeter  of a rectangle is :- %f",peri); getch(); } Output :-      

ads2