The trouble is you think you have time. Your success depends on how you utilize your time.

C++ program which takes base and height as input and gives area of rectangle

Write a C++ program which takes Base and Height as input and gives area of rectangle as output.

#include<iostream>
using namespace std;
int main()
{ cout<<"www.moznum.blogspot.com"<<endl<<endl;

float base,heigth,area;
cout << "Enter the base: ";
cin >>base;
cout << "Enter the heigth: ";
cin >>heigth;

area = base*heigth;


cout << "Area of rectangle is: " << area <<endl;

return 0;
}

You can also search this topic by:
How to find the area of rectangle in C++ by taking input of base and height.

No comments:

Post a Comment