//Program to calculate area of rectangle in C #include<stdio.h> int main() { float b,l,area; printf("Enter the length of rectangle :- "); scanf("%f",&l); printf("Enter the breadth of rectangle :- "); scanf("%f",&b); //Area of rectangle = length * breadth area = l * b; printf("Area of rectangle = %.2f",area); return 0; }
Output :-
0 Comments