+ 4
Is this a valid way to declare variables?
3 Respuestas
+ 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!