C++ PROGRAM TO FIND THE AREA OF TRIANGLE
Sample Test Case : Enter height and breadth : 5 2
Sample Test Case : Area of Triangle : 5.0
CODE
#include <iostream>
using namespace std;
int main()
{
float a,b,area;
cout<<"Enter height and breadth :";
cin>>a>>b;
area=0.5*a*b;
cout<<"Area of Triangle :"<<area;
return 0;
}

No comments:
Post a Comment