recent

C Program To Calculate Area Of Equilatral Triangle

C Program To Calculate Area Of Equilatral Triangle

#include<math.h>
 int main()
{

int side;
 float area, a;
 a = sqrt(3) / 4;

 printf("Enter Length of Side : \n");
 scanf("%d", &side);    //input from user

 area = a * side * side;   //Area Calculation
 printf("Area of Equilateral Triangle : %f\n", area);  //Print Output On Screen

 }
Powered by Blogger.