Area of triangle in C Language

C Language

Area of triangle in C Language :



#include<stdio.h>
main()
{
int a,b,area;
printf("\nenter the base of triangle = ");
scanf("%d",&a);

printf("\nenter the height of triangle = ");
scanf("%d",&b);

area=(a*b)/2;
printf("\nArea of triangle = %d",area);


}

Output :

Base of Triangle      :  456

Height of Triangle :  234

Result i.e. Area of triangle :  53352 




Vishvesh Shivam

Vishvesh Shivam is the dynamic founder of TheVsHub.in, a platform he is continually refining with his passion and dedication. A web developer and student based in the scenic Himachal Pradesh, Vishvesh embodies self-reliance and innovation. His quick decision-making ability and relentless drive set him apart, fueling his mission to elevate TheVsHub.in every single day.

Post a Comment

We Love Hearing from You!
Thank you for reading our post! Your thoughts and opinions are important to us. Please leave a comment below to share your feedback, ask questions, or start a discussion. We look forward to engaging with you!

Note: Comments are moderated to ensure a respectful and positive environment.

Previous Post Next Post
Code Copied!