1.
Write a C program to find the area of triangle.
#include<stdio.h>
#include<conio.h>
int main()
{
int b,h;
float a;
printf("Enter
base: ");
scanf("%d",
&b);
printf("Enter
height: ");
scanf("%d",
&h);
a=(b*h)/2;
printf("Area
of triangle= %.2f", a);
return 0;
}
No comments:
Post a Comment