islam_hmam's blog

By islam_hmam, history, 5 years ago, In English

this code give me run time error i dont know why ,This program for get sum of any number digits by java

https://ideone.com/e.js/WboQW1

i try it in netbeans and dont give any wrong

https://codeforces.com/group/bb2AzpRPk4/contest/233552/problem/H

  • Vote: I like it
  • -14
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

If the error happens on the first test, it may be because the problem requires reading from file, and you try to read from the standard input. It's empty, hence in.next() fails. It happens while program is running, hence the name "run-time error".

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice spam to recent actions.