Pages

Adsense responsive

Friday, 1 February 2013

C PROGRAM: TO CALCULATE AREA OF TRIANGLE

CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
float base,height,area;
clrscr();
printf("Enter base of triangle ");
scanf("%f",&base);
printf("Enter height of triangle ");
scanf("%f",&height);
area=0.5*base*height;
printf("Area of triangle = %f",area);
getch();
}


CODING

OUTPUT

For any query or suggestion please comment below..

No comments:

Post a Comment