Sunday, 4 February 2018

C Program to Find Area of Triangle

Today we will discuss about how to find out area of triangle. 

Write a C Program to find Area of Triangle : 

#incule <stdio.h>
#incule <conio.h>
void main()
{
int height, base;  //give any two names to variable
float area; // area may comes in fraction
printf("\n enter height & base of triangle");
scanf("%d%d", &height, &base);
area=(1/2)*height*base ;
Printf(" Area of triangle is = %f, area0;
getch();
}



Also Read :

Operators in C

Variables in C Programming

Share This
Previous Post
Next Post

Admin and author of BestBCANotes. Complted master degree in Computer Science.

0 comments: