{"id":132,"date":"2026-11-21T03:20:30","date_gmt":"2026-11-20T21:50:30","guid":{"rendered":"https:\/\/bhashitva.org\/index.php\/bhash-caesar-salad-cipher\/"},"modified":"2026-11-21T03:20:30","modified_gmt":"2026-11-20T21:50:30","slug":"bhash-caesar-salad-cipher","status":"publish","type":"page","link":"https:\/\/bhashitva.org\/index.php\/bhash-caesar-salad-cipher\/","title":{"rendered":"Caesar Salad Cipher"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/bhashitva.org\/index.php\/bhash-problem-showcase\/\">\u0938\u092d\u0940 \u0938\u092e\u0938\u094d\u092f\u093e\u090f\u0901 \u00b7 Bhash Problem Showcase<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0938\u092e\u0938\u094d\u092f\u093e \u00b7 \u0905\u0915\u094d\u0937\u0930\u094b\u0902 \u0915\u093e \u091a\u0915\u094d\u0930\u0940\u092f \u092c\u0926\u0932\u093e\u0935<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Read one line of uppercase English text with spaces. Shift successive letters right by 19, 1, 12, 1 and 4 places, repeating this pattern and wrapping from Z to A. Preserve spaces and advance the shift only when processing a letter. Print the encoded line.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0938\u092e\u093e\u0927\u093e\u0928 \u00b7 How the solution works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cycle through the five right shifts 19, 1, 12, 1 and 4. Copy spaces without advancing the shift index. Modulo 26 wraps letters past Z.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0909\u0926\u093e\u0939\u0930\u0923 \u00b7 Sample input<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>HELLO MOM<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0905\u092a\u0947\u0915\u094d\u0937\u093f\u0924 \u092a\u0930\u093f\u0923\u093e\u092e \u00b7 Expected output<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>AFXMS FPY<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u092d\u093e\u0937 \u0938\u094d\u0930\u094b\u0924 \u00b7 Complete Bhash program<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\u0906\u092f\u093e\u0924 \u092e\u093e\u0928\u0915.\u092a\u093e\u0920\u094d\u092f;\n\u092b\u0932\u0928 \u092e\u0941\u0916\u094d\u092f() -&gt; \u0936\u0942\u0928\u094d\u092f {\n    \u0938\u094d\u0925\u093f\u0930 \u0935\u0930\u094d\u0923: \u092a\u093e\u0920 = &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;;\n    \u0938\u094d\u0925\u093f\u0930 \u091a\u093e\u0932: \u092a\u0942\u0930\u094d\u0923\u093e\u0902\u0915[] = \u0928\u092f\u093e \u092a\u0942\u0930\u094d\u0923\u093e\u0902\u0915[]{19,1,12,1,4};\n    \u0938\u094d\u0925\u093f\u0930 \u0938\u0902\u0926\u0947\u0936: \u092a\u093e\u0920 = \u092a\u093e\u0920\u092a\u0922\u093c\u094b();\n    \u092e\u093e\u0928 \u0909\u0924\u094d\u0924\u0930: \u092a\u093e\u0920 = &quot;&quot;;\n    \u092e\u093e\u0928 \u0915\u094d\u0930\u092e: \u092a\u0942\u0930\u094d\u0923\u093e\u0902\u0915 = 0;\n    \u092e\u093e\u0928 \u0938\u094d\u0925\u093e\u0928: \u092a\u0942\u0930\u094d\u0923\u093e\u0902\u0915 = 0;\n    \u091c\u092c\u0924\u0915 (\u0938\u094d\u0925\u093e\u0928 &lt; \u0932\u0902\u092c\u093e\u0908(\u0938\u0902\u0926\u0947\u0936)) {\n        \u092e\u093e\u0928 \u0905\u0915\u094d\u0937\u0930: \u092a\u093e\u0920 = \u0905\u0902\u0936(\u0938\u0902\u0926\u0947\u0936,\u0938\u094d\u0925\u093e\u0928,\u0938\u094d\u0925\u093e\u0928+1);\n        \u092f\u0926\u093f (\u0905\u0915\u094d\u0937\u0930 != &quot; &quot;) {\n            \u0938\u094d\u0925\u093f\u0930 \u0928\u092f\u093e\u093e\u0902\u0915: \u092a\u0942\u0930\u094d\u0923\u093e\u0902\u0915 = (\u092a\u093e\u0920\u094d\u092f.\u0916\u094b\u091c\u094b(\u0935\u0930\u094d\u0923,\u0905\u0915\u094d\u0937\u0930)+\u091a\u093e\u0932[\u0915\u094d\u0930\u092e%5])%26;\n            \u0905\u0915\u094d\u0937\u0930 = \u0905\u0902\u0936(\u0935\u0930\u094d\u0923,\u0928\u092f\u093e\u093e\u0902\u0915,\u0928\u092f\u093e\u093e\u0902\u0915+1);\n            \u0915\u094d\u0930\u092e = \u0915\u094d\u0930\u092e+1;\n        }\n        \u0909\u0924\u094d\u0924\u0930 = \u0909\u0924\u094d\u0924\u0930+\u0905\u0915\u094d\u0937\u0930; \u0938\u094d\u0925\u093e\u0928 = \u0938\u094d\u0925\u093e\u0928+1;\n    }\n    \u0932\u093f\u0916\u094b(\u0909\u0924\u094d\u0924\u0930);\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0938\u092d\u0940 \u0938\u092e\u0938\u094d\u092f\u093e\u090f\u0901 \u00b7 Bhash Problem Showcase \u0938\u092e\u0938\u094d\u092f\u093e \u00b7 \u0905\u0915\u094d\u0937\u0930\u094b\u0902 \u0915\u093e \u091a\u0915\u094d\u0930\u0940\u092f \u092c\u0926\u0932\u093e\u0935 Read one line of uppercase English text with spaces. Shift successive letters right by 19, 1, 12, 1 and 4 places, repeating this pattern and wrapping from Z<span class=\"more-dots\">&#8230;<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-132","page","type-page","status-publish","hentry","no-post-thumbnail"],"_links":{"self":[{"href":"https:\/\/bhashitva.org\/index.php\/wp-json\/wp\/v2\/pages\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bhashitva.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bhashitva.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bhashitva.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bhashitva.org\/index.php\/wp-json\/wp\/v2\/comments?post=132"}],"version-history":[{"count":0,"href":"https:\/\/bhashitva.org\/index.php\/wp-json\/wp\/v2\/pages\/132\/revisions"}],"wp:attachment":[{"href":"https:\/\/bhashitva.org\/index.php\/wp-json\/wp\/v2\/media?parent=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}