Exception in thread “main” java.util.InputMismatchException

前端 未结 2 1079
醉梦人生
醉梦人生 2020-11-30 14:10

i need help with one exercise in java, i\'m stuck on this error 2 hours maybe. Any help would be great.

Exception in thread \"main\" java.util.InputMismatch         


        
2条回答
  •  悲&欢浪女
    2020-11-30 14:55

    You need to put an int in before you get to imer or cenar:

    n=input.nextInt();
    

    This line doesn't appear to be doing anything, either remove it, or put a number in before you put your imer or cenar values in.

提交回复
热议问题