C Program to Calculate Area of Right angle Triangle

C Program to Calculate Area of Right angle Triangle

C program to find area of right angle triangle; Through this tutorial, we will learn how to find area of right angle triangle in c program.

Programs and Algorithm to Find Area of Right angle Triangle

Use the following algorithm and program to find area of right angle triangle in c:

  • Algorithm to Find Area of Right angle Triangle
  • C Program to Find Area of Right angle Triangle

Algorithm to Find Area of Right angle Triangle

  • Take a input height and base from user in program and store in variables.
  • Calculate area of right angle triangle using area = 0.5 * base * height;
  • Print area of right angle triangle.

C Program to Find Area of Right angle Triangle

#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);
}

The output of the above c program; as follows:

Enter the base of Right Angle Triangle : 10
Enter the height of Right Angle Triangle : 5
Area of Right Angle Triangle : 25.000000

Recommended C Programs

AuthorAdmin

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *