i can't input float number in intellij
Answered

Please sign in to leave a comment.
This has nothing to do with Intellij, you are missing scanner.nextLine() between line 10 and 11
it works for int numbers
You may try with different decimal separators (comma for example). It depends on locale. See this thread for details:
https://stackoverflow.com/questions/5054132/how-to-change-the-decimal-separator-of-decimalformat-from-comma-to-dot-point
Please also note that the issue is not related to IntelliJ IDEA and the output is the same in the command line. That is why it is better to ask such questions on general forums like StackOverflow.