Problem :- C++ Program To Find Area Of Triangle .
Area Of Triangle:-To Find the Area Of Triangle we need to height and base . given formula show that
Area = ( Height * Base )/2
See Also :- C Program To Find Area Of Triangle
Solution :-
#include<iostream>
using namespace std;
int main()
{
/*Program By Ghanendra Yadav
Visit http://www.programmingwithbasics.com/
*/
float b,h,area;
cout<<"Enter Height and Base Of Triangle : ";
cin>>h>>b;
area = (h*b)/2;
cout<<"Area of Triangle is:"<<area<<endl;
return 0;
}
See Also :- Java Program To Find Area Of Triangle
Output:-
Area Of Triangle:-To Find the Area Of Triangle we need to height and base . given formula show that
Area = ( Height * Base )/2
See Also :- C Program To Find Area Of Triangle
Solution :-
#include<iostream>
using namespace std;
int main()
{
/*Program By Ghanendra Yadav
Visit http://www.programmingwithbasics.com/
*/
float b,h,area;
cout<<"Enter Height and Base Of Triangle : ";
cin>>h>>b;
area = (h*b)/2;
cout<<"Area of Triangle is:"<<area<<endl;
return 0;
}
See Also :- Java Program To Find Area Of Triangle
0 Comments: