Previous
0 / 23
Module DEMO-32-108DEMO-C-32

Caesar Cipher

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that encrypts a string using a Caesar cipher with a shift of 1 (a->b, z->a). Conservation of case is required.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

Cipher

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
Attribute!9
Buusjcvuf!9
Shifting Attribute!9 by 1 gives Buusjcvuf!9.
Sample #2
Public sample
Database?4
Ebubcbtf?4
Shifting Database?4 by 1 gives Ebubcbtf?4.
Sample #3
Public sample
Scrum?6
Tdsvn?6
Shifting Scrum?6 by 1 gives Tdsvn?6.
Sample #4
Public sample
Object?2
Pckfdu?2
Shifting Object?2 by 1 gives Pckfdu?2.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings