{"id":948,"date":"2021-11-08T16:17:15","date_gmt":"2021-11-08T16:17:15","guid":{"rendered":"https:\/\/ethosspace.com\/programmers\/?p=948"},"modified":"2021-11-11T08:06:55","modified_gmt":"2021-11-11T08:06:55","slug":"simple-c-program-to-get-square-root-of-any-number","status":"publish","type":"post","link":"https:\/\/ethosspace.com\/programmers\/simple-c-program-to-get-square-root-of-any-number\/","title":{"rendered":"Simple C program to get square root of any number"},"content":{"rendered":"\n<p>Square Root is a factor of a number that, when multiplied by itself, gives the original number. This C Program will find squareroot of any number.\u00a0C language provides <strong>math.h<\/strong> library file to perform various mathematical operations like square, power.<\/p>\n\n\n\n<p>For example, if we take an example of 25 then the square root is 5. <br>5*5 = 25<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-c\" data-lang=\"C\"><code>\/\/ Program for math operations like power, square root.\n#include &lt;stdio.h&gt;\n#include &lt;math.h&gt;\nint main() {\n    \/\/ declaring variable in double\n    double num,sr;\n    printf(&quot;\\nEnter number to find square root\\t&quot;);\n    scanf(&quot;%lf&quot;,&num);\n    sr = sqrt(num);\n    printf(&quot;\\n\\nSquare root of number %lf is %lf&quot;,num,sr);\n    return 0;\n}<\/code><\/pre><\/div>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-c\" data-lang=\"C\"><code>Enter number to find square root\t625\nSquare root of number 625.000000 is 25.000000<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Square Root is a factor of a number that, when multiplied by itself, gives the original number. This C Program will find squareroot of any number.\u00a0C language provides math.h library file to perform various mathematical operations like square, power. For example, if we take an example of 25 then the square root is 5. 5*5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-948","post","type-post","status-publish","format-standard","hentry","category-c-language"],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"sparkling-featured":false,"sparkling-featured-fullwidth":false,"tab-small":false},"uagb_author_info":{"display_name":"program45_-rt8nb","author_link":"https:\/\/ethosspace.com\/programmers\/author\/program45_-rt8nb\/"},"uagb_comment_info":0,"uagb_excerpt":"Square Root is a factor of a number that, when multiplied by itself, gives the original number. This C Program will find squareroot of any number.\u00a0C language provides math.h library file to perform various mathematical operations like square, power. For example, if we take an example of 25 then the square root is 5. 5*5&hellip;","_links":{"self":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/comments?post=948"}],"version-history":[{"count":4,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/948\/revisions"}],"predecessor-version":[{"id":968,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/948\/revisions\/968"}],"wp:attachment":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/media?parent=948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/categories?post=948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/tags?post=948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}