C++ Programs & Stuffz

Nothing like anything!!!

Please Click on ADS!!

Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!

Tuesday, August 31, 2010

Find the area of a triangle

//pgm to find the area of a triangle
#include<iostream.h>
#include<conio.h>
void main()
{
    float b,h,area;
    clrscr();
    cout<<"enter the base length of the triangle";
    cin>>b;
    cout<<"enter the height of the triangle";
    cin>>h;
    area=0.5*b*h;
    cout<<"area="<<area;
    getch();
}

0 comments:

Post a Comment

free counters