Using the switch statement

I guess you can achive that with nested if checking char by char