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