#include<stdio.h>
#include<conio.h>
void main()
float a,b,h //to get accurate results a is area, b is breadth, h is height.
clrscr();
printf("Enter base\n");
scanf("%f",&b);
printf("Enter the height\n");
scanf("%f",&h);
a=0.5*b*h;
printf("Area of triangle=%f",a);
getch();
}
IN OUR NEXT POST I WILL EXPLAIN ABOUT AREA OF SQUARE.
No comments:
Post a Comment