HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C Program to calculate Area of an Equilateral Triangle ?


Q:- Write a C Program to Calculate Area of an Equilateral Triangle ?

Input

#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float side,area;
clrscr();
printf(“Enter Side of an Equilateral Triangle=”);
scanf(“%f”,&side);
area = (sqrt(3)/(4))*(side*side);
printf(“Area of an Equilateral Triangle=%.3f”,area);
getch();
       }


Output

Enter Side of an Equilateral Triangle = 75
Area of an Equilateral Triangle = 2435.69 sq. units

Comments