164k views
18 votes
Write a c program to find area of rectangle using user defined function.​

User Jeffkee
by
6.2k points

1 Answer

7 votes

Answer:

// C Program to Find Area of Rectangle

#include <stdio.h>

int main() {

float length, width, area;

printf("Enter the length & width of the rectangle::\\");

scanf("%f", &length);

scanf("%f", &width);

// It will calculate area of rectangle

area = length * width;

// It will print the final output

printf("\\Area of the rectangle is: %f units\\", area);

return 0;

}

Hope This Helps!!!

User Hishaam Namooya
by
6.3k points