Q.no program to calculate the area of the triangle in c-programing?
#include<stdio.h>
#include<conio.h>
void main()
{
int h,b;
float area;
printf("enter the value of height and base of the triangle");
scanf("%d %d",&h,&b);
area=(h*b)/2;
printf("the area of the triangle is %0.2f",area);
getch();
}
No comments:
Post a Comment