#include<stdio.h>
int main()
{
int b,h;
int area;
printf("Enter the base of the triangle:");
scanf("%d",&b);
printf("Enter the height of the triangle:");
scanf("%d",&h);
area=(b*h)/2;
printf("\n\t\t The area of triangle is %d",area); /* is used for escaping one line and \t is used for
shifting the line one tab forward*/
getch();
No comments:
Post a Comment