HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C Program to Enter Length and Breadth of Rectangle and Find its Perimeter ?

Q:- Write a C Program to Enter Length and Breadth of Rectangle and Find its Perimeter ?

 Input
#include<stdio.h>
#include<conio.h>

int main()
    {
         float len,bre,per;
         clrscr();
         printf("Enter Length of Rectangle=");
         scanf("%f",&len);
         printf("Enter Breadth of rectangle=");
         scanf("%f",&bre);
  per=2*(len+bre);
  printf("Perimeter of rectangle=%.2f",per);
  getch();
}


Output
Enter Length of rectangle = 10
Enter breadth of rectangle = 20
Perimeter of Rectangle = 60 

Comments