C Program To Find Area Of A Triangle - Programming9

programming9
  • Flowcharts
  • Programs
      • Back
      • C Programs
      • C++ Programs
      • Java Programs
      • Python Codes
      • HTML Codes
      • Java Script Codes
      • SQL Codes
  • Tutorials
      • Back
      • Java Tutorials
      • Competitive Programming
      • Python Tutorials
      • C Programming
  • Blog
  • Login
Search Search C Program to Find Area of a Triangle Written by: RajaSekhar
  • basic c programs
  • C Program
  • area
  • triangle
#include<math.h> #include<conio.h> #include<stdio.h> int main() { float a,b,c,s,area; printf("enter the values of a,b,c"); scanf("%f %f %f",&a,&b,&c); s=(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); printf("the area of a trangle is : %f ",area); return 0; }

OUTPUT:

enter the values of a,b,c 12 36 45 the area of a trangle is : 158.955765

Possible Error: 1) Function ‘sqrt( )’ should have a prototype : You should include ‘math.h’ Header file, And can use ‘sqrt ( )’ and all other mathematical functions.

Previous article: C Program to Swap Two Numbers without using Third Variable Next article: Evaluate Algebraic Expression (ax+b)/(ax-b)
  • C Program to Check the Leap Year
  • Page Replacement Programs in C
  • C Program to Implement Doubly Linked List Operations
  • C Program to Find Smallest Element in the Array
  • C Program to Find Sum of All Array Values
  • C Program to Find Area of a Triangle
  • C Program to Find Prime Factors of a Given Positive Number
  • C Program to Convert Temperature from Degree Centigrade to Fahrenheit
  • C Program for String Comparison without using Built in Function
  • Bit Stuffing Program in C
  • C Program to Find Sum of N Natural Numbers
  • Bubble Sort in C
  • C Program to Print Addresses of Variables
  • C Program to Calculate Sum of Odd Values in an Array
  • Evaluate Algebraic Expression (ax+b)/(ax-b)

Tag » Area Of Triangle C Code