Ask coding questions

← Back to all posts
The switch code is not running please help
ALVIJAYABASKARV (0)

the final calculation is not appearing. the code is hanging at choose food

Answered by notGilbert (121) [earned 5 cycles]
View Answer
Comments
hotnewtop
notGilbert (121)

You're comparing an Int with a String, which will always equal false

remove the apostrophe ' from the numbers in the switch