{"id":4651,"date":"2023-02-06T08:46:03","date_gmt":"2023-02-06T08:46:03","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=4651"},"modified":"2023-02-06T08:46:33","modified_gmt":"2023-02-06T08:46:33","slug":"c-program-to-find-area-of-equilateral-triangle","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/c-program-to-find-area-of-equilateral-triangle\/","title":{"rendered":"C Program to Find Area of Equilateral Triangle"},"content":{"rendered":"\n<p>In this article, we are going to discuss how to calculate the area of an equilateral triangle. So let&#8217;s start!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">C Program to Find Area of Equilateral Triangle<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">For example &#8211;<\/h4>\n\n\n\n<p><strong>Input :<\/strong><\/p>\n\n\n\n<p>So first to calculate the area of the equilateral triangle we are taking user input so for that we simply Enter the side of the equilateral triangle that is 24<\/p>\n\n\n\n<p><strong>Logic:<\/strong><\/p>\n\n\n\n<p>To calculate the area of the equilateral triangle we know the formula first so the formula is :<\/p>\n\n\n\n<p>Equivalent to area = sqrt(3)\/4 * a * a<\/p>\n\n\n\n<p>To apply this formula in our program we simply use sqrt() function in it. Because in this formula we are going to deal with a square root that&#8217;s why we use sqrt() function in it. For that, we use &lt;math.h&gt; header file it.<\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>According to our output, we simply get our output as-<\/p>\n\n\n\n<p>Enter the side of the equilateral triangle: 24<\/p>\n\n\n\n<p>The area of the equilateral triangle is 249.415314<\/p>\n\n\n\n<p>\/\/ C program to calculate the area of the equilateral triangle<\/p>\n\n\n\n<p class=\"has-white-color has-black-background-color has-text-color has-background\">#include&lt;stdio.h&gt;<br>#include&lt;math.h&gt;<\/p>\n\n\n\n<p class=\"has-white-color has-black-background-color has-text-color has-background\">int main(){<br>float side. area ;<br>printf(&#8220;Enter the side of equilateral triangle :&#8221;);<br>scanf(&#8220;%f&#8221;, &amp; side);<br>area = sqrt(3)\/4 * side * side;<br>printf(&#8220;Area of equilateral triangle is %f&#8221;, area);<br>return 0;<br>}<\/p>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<p>Enter the side of the equilateral triangle: 24<\/p>\n\n\n\n<p>The area of an equilateral triangle is 249.415314<\/p>\n\n\n\n<p>In this way, we simply understand how to calculate the area of an equilateral triangle. I hope this thing is clear to you. So for now keep learning and keep exploring.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we are going to discuss how to calculate the area of an equilateral triangle. So let&#8217;s start! C Program to Find Area of Equilateral Triangle For example &#8211; Input : So first to calculate the area of the equilateral triangle we are taking user input so for that we simply Enter the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[29,109],"class_list":{"0":"post-4651","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-c-program","7":"tag-c-program","8":"tag-c-program-to-find-area-of-equilateral-triangle"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/4651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=4651"}],"version-history":[{"count":1,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/4651\/revisions"}],"predecessor-version":[{"id":4652,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/4651\/revisions\/4652"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=4651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=4651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=4651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}