belongs to collection: Simple Programs in C++ Programming
Write A 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
#include<iostream> using namespace std; int main() { 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; }
Output:
Enter Height and Base Of Triangle : 25.5
15.5
Area of Triangle is:197.625
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Output:
Enter Height and Base Of Triangle : 25.5
15.5
Area of Triangle is:197.625
need an explanation for this answer? contact us directly to get an explanation for this answer