Posts

Showing posts with the label Area of Triangle

C Program to Find Area of Triangle Using Heron's Formula हेरॉन के सूत्र की सहायता से त्रिभुज का क्षेत्रफल ज्ञात करने का प्रोग्राम

Heron's formula is used to calculate the area of a triangle when the lengths of its three sides are given. हेरॉन के सूत्र का प्रयोग तब किया जाता है जब किसी त्रिभुज की तीनों भुजाओं की लंबाई दी गई हो तथा उसके आधार एवं ऊँचाई की जानकारी उपलब्ध न हो। Heron's Formula हेरॉन का सूत्र The area of a triangle can be calculated using the following formula: त्रिभुज का क्षेत्रफल निम्न सूत्र की सहायता से ज्ञात किया जा सकता है: Area = √[s(s − a)(s − b)(s − c)] Where: a , b , and c are the lengths of the three sides of the triangle. s is the semi-perimeter of the triangle. जहाँ: a , b तथा c त्रिभुज की तीनों भुजाओं की लंबाई हैं। s त्रिभुज का अर्धपरिमाप है। Semi-perimeter: s = (a + b + c) / 2 C Program #include <stdio.h> #include <math.h> int main(void) { float area, a, b, c, s; printf("Heron's Formula\n"); printf("Enter three sides of a triangle:\n"); scanf("%f %f %f", &a, &b, &c); /* Check whether sides can f...