216k views
2 votes
Write a C++ program to read the base , height and values, calculate and print the area of triangle

1 Answer

0 votes

Answer:

#include <iostream>

using namespace std;

int main() {

int h, b; float A;

cout<<"Enter height and base : ";

cin>>h>>b;

A= (0.5)*h*b;

cout<<"Area of triangle is : "<<A;

return 0;

}

User Vadim Caen
by
3.3k points