C Program to Find Area of a Right Angled Triangle

In this tutorial you will learn about the C Program to Find Area of a Right Angled Triangle and its application with practical example.

C Program to Find Area of a Right Angled Triangle

In this tutorial, we will learn to create a C program that will Find the Area of a Right Angled Triangle in C programming.

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

• Operators in C Programming.
• Basic Input and Output function in C Programming.
• Basic C programming.
• While loop in C programming.
• Conditional Statements in C programming.

Program description:-

In today’s tutorial, we will create a program, that will calculate the area of a right-angled triangle using C programming. First, take the input width, height of the right-angled triangle by the user. Then we will calculate the area of that right-angled triangle using the mathematical expression. At last, we will print the area of a right-angled triangle.

Output:-

In the above program, we have first initialized the required variable.

• width = it will hold the integer value for the input width of the right-angled triangle.
• height = it will hold the integer value for the input height of the right-angled triangle.
• Area  = it will hold the integer value for the area of a right-angled triangle.
• Perimeter = it will hold the integer value for the perimeter of a right-angled triangle.

Input the height, width of the right-angled triangle.

Code to calculate the area of the right-angled triangle.

Printing output the area of the right-angled triangle.

In this tutorial we have learn about the C Program to Find Area of a Right Angled Triangle and its application with practical example. I hope you will like this tutorial.