Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
programmingfaster.com
#include<stdio.h>
#include<conio.h>
void main()
{
float height,base,area;
printf("enter height of a triangle");
scanf("%f",&height);
printf("\n enter the base of a triangle");
scanf("%f",&base);
area=0.5*base*height;
printf("the area of the triangle is:%.2f",area);
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.