+ 4
Is this a valid way to declare variables?
3 Answers
+ 3
Your code is fine. But;
b may equals zero so you cannot do a division by zero! (Use an if statement here )
The variable div will give you an int so the decimal part is missed(it's your choice here)
+ 2
Thanks, Hisham YUM š²š¦
+ 1
Welcome š§š©Mohammad Sagorš§š© !
If you got your right answer, do not for forget to mark it as the best one š
Have a good day!