//Write a program to calculate area of right angle triangle.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int h,b,area;
cout<<"Enter perpendicular height -";
cin>>h;
cout<<"Enter base of the triangle -";
cin>>b;
area=h*b*0.5;
cout<<"Area of triangle -"<<area;
getch();
}
Output:
No comments:
Post a Comment