Computer Science, asked by soniyat749, 1 month ago

Write a program to calculate Area of a triangle with Base and Height.

[Base:30 Height:60 Area:900]​

Answers

Answered by MrTSR
1

This C0DE is written in C Language.

The C0DE:

#include<stdio.h>

int main(){

   int height, base;

   int area;

   printf("Enter the height of the Triangle: \n");

   scanf("%d",&height);

   printf("Enter the base of the Triangle \n");

   scanf("%d",&base);

  area=(height*base)/(float)2;

 printf("The area of the Triangle is : %d",area);

  return 0;

}

0UTPUT:

Enter the height of the Triangle:  

60

Enter the base of the Triangle  

30

The area of the Triangle is : 900

Attachments:
Similar questions