Pages

Sunday 6 November 2011

AREA PROGRAMS


1.     Area of triangle

//Area of Triangle
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int b,h;
float a;
cout<<"Enter the base of triangle";
cin>>b;
cout<<"Enter the height of triangle";
cin>>h;
a=0.5*b*h;
cout<<"Area of triangle";
cout<<a;
getch();
}

No comments:

Post a Comment