/*
TOPIC:TO COMPUTE AREA OF TRIANGLE IN C++
*/
#include<iostream.h>
void main()
{
long int a,b;
cout<<"enter height of the triangle in cm\n";
cin>>a;
cout<<"enter base of the triangle in cm\n";
cin>>b;
float c=a*b*0.5;
cout<<"the area of the triangle is:"<<c<<"cm^2";
}
No comments:
Post a Comment