cppbuzz logo

Home  |  About Us  |  Contact
View Questions Upload Training Misc..

C++ Program to calculate area of rectangle

using namespace std;

float area(float length, float width){
    return (length*width);

int main()
float length, width, rec_area;

cout<<"\n Enter Length : ";

cout<<"\n Enter Width : ";

rec_area = area(length, width);

cout<<"\n Area of Rectangle is : "<< rec_area;

return 0;

Be the first of your friends to like this Page