Hello There, Guest! Login Register
Advertise Here | Remove Ads

C Program to Calculate Area of Right angle Triangle

  • 0 Vote(s) - 0 Average


06-06-2016, 12:30 PM #1
Mitu Offline FFU SENIOR FFU SENIOR
VIP MEMBER
Posts:2,183 Threads:175 Joined:Sep 2014 Reputation: 2 Sex Female
FFUC: $0
Country: Bangladesh
Code:
#include<stdio.h>

int main() {
   int base, height;
   float area;

   printf("\nEnter the base of Right Angle Triangle : ");
   scanf("%d", &base);

   printf("\nEnter the height of Right Angle Triangle : ");
   scanf("%d", &height);

   area = 0.5 * base * height;
   printf("\nArea of Right Angle Triangle : %f", area);

   return (0);
}

Output :
Quote:Enter the base of Right Angle Triangle : 4
Enter the height of Right Angle Triangle : 8
Area of Right Angle Triangle : 16.0

[Image: 468x60_2.gif]







Forum Jump:


Users browsing this thread:1 Guest(s)

Advertise Here | Remove Ads