Skip to main content
Search
Search This Blog
Livecodo
Pages
Home
Courses
Blog
About us
More…
Share
Get link
Facebook
X
Pinterest
Email
Other Apps
March 28, 2024
Write a c program to calculate Area of Rectangle , Perimeter of a Rectangle and Diagonal of a Rectangle.
#include
#include
int main() { float l,b,A,P,D; printf("enter the value of l"); scanf("%f",&l); printf("enter the value of b"); scanf("%f",&b); A=l*b; P=2*(l+b); D=sqrt(l*l+b*b); printf("The area of rectangle is %f\n perimeter is %f\n diagonal is %f",A,P,D); return 0; }
Popular Posts
March 26, 2024
Dynamic Memory allocation in C
May 18, 2024
Searching and sorting Algorithm in C