Home / Programs / C Program to Calculate Area of Right angle Triangle
🚀 Programming Example

C Program to Calculate Area of Right angle Triangle

👁 2,354 Views
💻 Practical Program
📘 Step Learning
In this program we will calculate Area of Right angle Triangle

💻 Program Code

#include"stdio.h"
int main() {
   int base, height;
   float area;
 
   printf("\nEnter the base of Right Angle Triangle : \n");
   scanf("%d", &base);
 
   printf("\nEnter the height of Right Angle Triangle : \n");
   scanf("%d", &height);
 
   area = 0.5 * base * height;
   printf("\nArea of Right Angle Triangle : %f \n", area);
 
   return (0);
}
                        

🖥 Program Output

Enter the base of Right Angle Triangle :
5

Enter the height of Right Angle Triangle :
8

Area of Right Angle Triangle : 20.000000
Press any key to continue . . .
                            
📚 Learning Subject

Master Programming Through Practical Examples

Improve your coding logic, problem-solving skills and programming confidence by practicing real-world examples with explanations.

🎯 How to learn from this example

First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.

🔥 Practice suggestion

Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.