{"id":40,"date":"2021-10-31T15:12:00","date_gmt":"2021-10-31T15:12:00","guid":{"rendered":"https:\/\/rijankc.com.np\/2021\/10\/31\/wap-to-input-decimal-number-and-convert-it-to-binary-number\/"},"modified":"2024-11-04T09:26:07","modified_gmt":"2024-11-04T03:41:07","slug":"wap-to-input-decimal-number-and-convert-it-to-binary-number","status":"publish","type":"post","link":"https:\/\/rijankc.com.np\/?p=40","title":{"rendered":"WAP to input Decimal Number and convert it to Binary Number."},"content":{"rendered":"<p><strong>Question:\u00a0 Write a program to input Decimal number and convert it to Binary Number.<\/strong><\/p>\n<p>INPUT &#8220;Enter any number&#8221; ; n<br \/>\nt = 0<br \/>\np = 1<br \/>\nWHILE n &lt; &gt; 0<br \/>\nr = n MOD 2<br \/>\nt = t + r * p<br \/>\np = p * 10<br \/>\nn = n \\ 2<br \/>\nWEND<br \/>\nPRINT &#8220;Binary Number = &#8221; ; t<br \/>\nEND<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question:\u00a0 Write a program to input Decimal number and convert it to Binary Number. INPUT &#8220;Enter any number&#8221; ; n t = 0 p = 1 WHILE n &lt; &gt; 0 r = n MOD 2 t = t + r * p p = p * 10 n = n \\ 2 WEND PRINT [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":732,"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-40","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\/40","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=40"}],"version-history":[{"count":2,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":340,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/posts\/40\/revisions\/340"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=\/wp\/v2\/media\/732"}],"wp:attachment":[{"href":"https:\/\/rijankc.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rijankc.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}