Ask coding questions

← Back to all posts
Simple calculator
ALVIJAYABASKARV (0)

Why is it saying that variable answer might not have been initialized. can someone help please

Answered by Coder100 (18109) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18109)

Make sure you always have a default statement in your switch cases, the compiler has to make sure EVERY case is covered, and it's oftentimes not smart

EpicGamer007 (1736)

it works fine for me.

InvisibleOne (2953)

It seems to be working just fine for me. What's the operation where you doing?