I wrote this code, tested it on my pc an it threw the exception when I input numbers with decimals, however, I tried it on an online console and it worked perfectly