{"id":83,"date":"2021-09-20T13:01:20","date_gmt":"2021-09-20T13:01:20","guid":{"rendered":"https:\/\/ethosspace.com\/programmers\/?p=83"},"modified":"2021-10-11T11:51:59","modified_gmt":"2021-10-11T11:51:59","slug":"c-program-to-calculate-area-of-circle-circumference-volume-of-sphere","status":"publish","type":"post","link":"https:\/\/ethosspace.com\/programmers\/c-program-to-calculate-area-of-circle-circumference-volume-of-sphere\/","title":{"rendered":"C Program to Calculate Area of circle, circumference , volume of sphere"},"content":{"rendered":"\n<p>Program is accepting radius of circle and using below formula<\/p>\n\n\n\n<p>area of circle : A=\u03c0r2<\/p>\n\n\n\n<p>Circumference of circle = 2\u03c0r<\/p>\n\n\n\n<p>Volume of Sphere = V=4\/3 \u03c0r3<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/Program name: Calculate Area, Circumference of Circle and Volume of sphere\n\n#include&lt;stdio.h&gt;\n#include&lt;conio.h&gt;\n\n#define pi 3.14        \/\/constant decleration\n\nvoid main()\n{    int r,op;\n     float c_area,c_circumference,c_Vsphere;\n     printf(\"\\nEnter Radius of Circle to Calculate area, Circumference : \");\n     scanf(\"%d\",&amp;r);\n\n     printf(\"\\n\\t1) Area of Circle. \\n\\t2) Circumference of circle.\\n\\t3) Volume of Sphere.\");\n     printf(\"\\n\\n\\tSelect  Option : \");\n     scanf(\"%d\",&amp;op);\n     switch(op)\n\t{  case 1:  c_area=(float) pi*r*r;\n\t\t    printf(\"\\n\\n\\tArea of Circle = %.2f \",c_area);\n\t\t    break;\n\t   case 2:  c_circumference=(float) 2*pi*r;\n\t\t    printf(\"\\n\\n\\tCircumference of circle = %.2f \",c_circumference);\n\t\t    break;\n\t   case 3:  c_Vsphere=(float) 4\/3*pi*r*r*r;\n\t\t    printf(\"\\n\\n\\tVolume of Sphere = %.2f \",c_Vsphere);\n\t\t    break;\n\t   default: printf(\"\\n\\t Invalid option \");\n\n\t}\n\n}\/\/main                                    <\/code><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Output<\/h4>\n\n\n\n<div class=\"wp-block-columns has-white-color has-cyan-bluish-gray-background-color has-text-color has-background is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>Enter Radius of Circle to Calculate area, Circumference : 7\n\n        1) Area of Circle. \n        2) Circumference of circle.\n        3) Volume of Sphere.\n\n        Select  Option : 1\n\n        Area of Circle = 153.86 \n \t\n\tSelect  Option : 2\n\n\tCircumference of circle. = 43.96\n\n\tSelect  Option : 3\n\n\tVolume of Sphere. = 1436.03 <\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Program is accepting radius of circle and using below formula area of circle : A=\u03c0r2 Circumference of circle = 2\u03c0r Volume of Sphere = V=4\/3 \u03c0r3 Output<\/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-83","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":"Program is accepting radius of circle and using below formula area of circle : A=\u03c0r2 Circumference of circle = 2\u03c0r Volume of Sphere = V=4\/3 \u03c0r3 Output","_links":{"self":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/83","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=83"}],"version-history":[{"count":4,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/83\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}