{"id":47,"date":"2021-10-31T14:34:00","date_gmt":"2021-10-31T14:34:00","guid":{"rendered":"https:\/\/rijankc.com.np\/2021\/10\/31\/wap-to-calculate-the-volume-of-a-sphere\/"},"modified":"2024-11-04T09:36:28","modified_gmt":"2024-11-04T03:51:28","slug":"wap-to-calculate-the-volume-of-a-sphere","status":"publish","type":"post","link":"https:\/\/rijankc.com.np\/?p=47","title":{"rendered":"WAP to calculate the Volume of a Sphere"},"content":{"rendered":"<p><b><span style=\"font-family: 'Times New Roman', 'serif'; text-indent: -0.25in;\">Questions:<br \/>\n<\/span><span style=\"font-family: 'Times New Roman', 'serif'; text-indent: -0.25in;\">The volume of a sphere is given by the formula v = 4\/3<\/span><span style=\"font-family: Symbol; text-indent: -0.25in;\">p<\/span><span style=\"font-family: 'Times New Roman', 'serif'; text-indent: -0.25in;\">r\u00b3. Given the value of the radius r, write a program to calculate the volume of a sphere.<\/span><\/b><\/p>\n<p style=\"line-height: normal; text-indent: -.25in; margin: 0in 0in 0in .25in;\"><span style=\"font-family: 'Times New Roman','serif'; mso-bidi-font-size: 11.0pt;\"><b>Ans:<span style=\"mso-tab-count: 1;\">\u00a0\u00a0\u00a0\u00a0 <\/span><\/b><\/span><\/p>\n<p style=\"line-height: normal; text-indent: -.25in; margin: 0in 0in 0in .25in;\"><span style=\"font-family: 'Times New Roman','serif'; mso-bidi-font-size: 11.0pt;\"><span style=\"mso-tab-count: 1;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>CLS<\/span><\/p>\n<p style=\"line-height: normal; text-indent: -.25in; margin: 0in 0in 0in .25in;\"><span style=\"font-family: 'Times New Roman','serif'; mso-bidi-font-size: 11.0pt;\"><span style=\"mso-tab-count: 1;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>pi = 3.141<\/span><\/p>\n<p style=\"line-height: normal; text-indent: -.25in; margin: 0in 0in 0in .25in;\"><span style=\"font-family: 'Times New Roman','serif'; mso-bidi-font-size: 11.0pt;\"><span style=\"mso-tab-count: 1;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>INPUT &#8220;Enter a radius&#8221; ; r<\/span><\/p>\n<p style=\"line-height: normal; text-indent: -.25in; margin: 0in 0in 0in .25in;\"><span style=\"font-family: 'Times New Roman','serif'; mso-bidi-font-size: 11.0pt;\"><span style=\"mso-tab-count: 1;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>v = 4\/3*pi*r^3<\/span><\/p>\n<p style=\"line-height: normal; text-indent: -.25in; margin: 0in 0in 0in .25in;\"><span style=\"font-family: 'Times New Roman','serif'; mso-bidi-font-size: 11.0pt;\"><span style=\"mso-tab-count: 1;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>PRINT &#8220;The volume of a sphere:&#8221;; v<\/span><\/p>\n<p style=\"line-height: normal; text-indent: -.25in; margin: 0in 0in 0in .25in;\"><span style=\"font-family: 'Times New Roman','serif'; mso-bidi-font-size: 11.0pt;\"><span style=\"mso-tab-count: 1;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>END<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Questions: The volume of a sphere is given by the formula v = 4\/3pr\u00b3. Given the value of the radius r, write a program to calculate the volume of a sphere. Ans:\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0 CLS \u00a0\u00a0\u00a0\u00a0\u00a0 pi = 3.141 \u00a0\u00a0\u00a0\u00a0\u00a0 INPUT &#8220;Enter a radius&#8221; ; r \u00a0\u00a0\u00a0\u00a0\u00a0 v = 4\/3*pi*r^3 \u00a0\u00a0\u00a0\u00a0\u00a0 PRINT &#8220;The volume of a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":739,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[115,114],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","category-wap"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47"}],"version-history":[{"count":2,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":427,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions\/427"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/media\/739"}],"wp:attachment":[{"href":"https:\/\/rijankc.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}