- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Environmental Science
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Calculate Area of Right angle Triangle using C Language
C Program to Calculate Area of Right angle Triangle
Definition :
Triangle having one angle of measure 90 degree is called Right angle Triangle.
Sides of Triangle are : base , height , hypotenuse.
You can compute the area of a Tr. if you know its any two sides.
Program :
#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 :
Enter the base of Right Angle Triangle : 4
Enter the height of Right Angle Triangle : 8
Area of Right Angle Triangle : 16.0
- Related Questions & Answers
- How to calculate gross salary of a person using C Program
- How to reads customer number and power consumed and prints amount to be paid using C
- How to redirect HTTP to HTTPS Using htaccess
- How can we create recursive functions in Python?
- Write C Program to Find Factorial of Number Using Recursion
- How to calculate sum of 5 subjects and find percentage Using C Program
- How to make a chain of function decorators in Python?
- How to find gretest in 3 number using C Programming
- What are Python function attributes?
- Write C Program to Find Largest Element in Array in C Programming
- Write a C program using pointers to read in an array of integers and print its elements in reverse order.
- How to Calculate Area of Rectangle using C Program
- What is SQL ?
- How To Send mail from your Gmail account using Python
- How to Check Whether Number is Perfect Or Not using C
- How to Calculate Area of Equilatral Triangle using C Language
Advertisements
ads