nextInt方法是接受整数,你输入的是浮点型,当然报错
自己去搜搜nextInt()及相关方法就知道了https://blog.csdn.net/weixin_58428216/article/details/119515900