Write a program Area of Triangle

 Write a program Area of Triangle.

Write a program Area of Triangle


//Find area of a triangle
#include<stdio.h>
#include<conio.h>
void main()
{
    int base,height,area;
    printf("\n Area of Triangle");
    printf("\n Enter base=");
    scanf("%d",&base);
    printf("\n Enter height=");
    scanf("%d",&height);
    area=(base*height)/2;
    printf("\n Area of triangle=%d",area);
getch();
}

Output:-
Area of Triangle Enter base=20 Enter height=4 Area of triangle=40













Related Program (Please Check)

1. Basic Question All




Post a Comment

0 Comments