Skip to content
Sign upLog in
← Back to Community

Simple calculator

Profile icon
ALVIJAYABASKARV

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

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
ALVIJAYABASKARV
Comments
hotnewtop
Profile icon
Coder100

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

Profile icon
EpicGamer007

it works fine for me.

Profile icon
InvisibleOne

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