Q:

C++ Program To Find Area Of Triangle

belongs to collection: Simple Programs in C++ Programming

0

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 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Program to Convert a person\'s name in Ab... >>
<< C++ Program To Print Ascii Value Of Character...