top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

C Program to Calculate Area of Equilatral Triangle?

+3 votes
86 views
C Program to Calculate Area of Equilatral Triangle?
posted Dec 2, 2014 by Manikandan J

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes
 
Best answer
#include<stdio.h>
#include<math.h>

int main() {
   int side;
   float area, r_4;

   r_4 = sqrt(3) / 4;

   printf("\nEnter the Length of Side : ");
   scanf("%d", &side);

   area = r_4 * side * side;

   printf("\nArea of Equilateral Triangle : %f", area);
   return (0);
}

Output :

Enter the Length of Side : 5
Area of Equilateral Triangle : 10.82
answer Dec 2, 2014 by Shivaranjini
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...