How can I check if an integer ends with a zero? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How can I check if an integer ends with a zero?

So I'm talking about ages here. So the numbers are mostly like 35, 20 and so on. The program should recognize that the 20 ends with a 0 and 35 not. thanks in advance xx

19th Apr 2017, 8:48 AM
ā€ŽÉÄ±sıօլɐ
ā€ŽÉÄ±sıօլɐ - avatar
1 Resposta
+ 4
if (x%10 == 0) {... }
19th Apr 2017, 8:51 AM
Jeth
Jeth - avatar