Wednesday, 19 February 2014

write a program to find the area of triangle.


#include<stdio.h>
main()
{
float base,height,area;
printf("enter the base and height of triangle:");
scanf(" %f %f",&base,&height);
area=(1.0/2.0*(base*height));
printf("area of triangle= %f\n",area);
}

No comments:

Contact Form

Name

Email *

Message *