+ 1

Hey everyone, just trying to make a simple calculator but computer says no. Can anyone help?

https://code.sololearn.com/cRoSMFWDGXmX/?ref=app

10th May 2019, 6:44 AM
JoBee
6 Réponses
+ 3
Your variable op is a char, so your switch cases must be char too: '+', '-', '/' ... And your div will fail if you devide by zero.
10th May 2019, 6:51 AM
Daniel Adam
Daniel Adam - avatar
+ 1
Thank you 🙂
10th May 2019, 11:08 AM
JoBee
0
Oh yeah, thank you. Still not working though 🤷‍♀️
10th May 2019, 8:26 AM
JoBee
0
Thanks ~ swim ~ .... didn't know that. It's still not working though!
10th May 2019, 10:15 AM
JoBee