Caesar Cipher Problem

Caesar Cipher Problem — ExecCode School DSA Practice

Solve the Caesar Cipher problem on ExecCode. Free online school DSA practice in Strings - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a word and a number. Your task is to change each letter in the word by moving it forward in the alphabet by that number of steps. If you go past the letter 'Z', start over from 'A'. Print the new, changed word.

Examples

Input ABC 3; Output DEF. Input XYZ 2; Output ZAB

Constraints

1<=K<=25

Practice Caesar Cipher free on ExecCode. Browse DSA problems, topic map, and placement guides.