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

Toggle Case

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that swaps the case of every alphabet in the string. Lowercase becomes uppercase and vice versa.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

Swapped

Sample Testcases

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

Sample #1
Public sample
Component?6
cOMPONENT?6
Toggling case of Component?6 gives cOMPONENT?6.
Sample #2
Public sample
Ugli#4
uGLI#4
Toggling case of Ugli#4 gives uGLI#4.
Sample #3
Public sample
Agile?6
aGILE?6
Toggling case of Agile?6 gives aGILE?6.
Sample #4
Public sample
Papaya#4
pAPAYA#4
Toggling case of Papaya#4 gives pAPAYA#4.

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