We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
scan.nextDouble() skips over all characters (including whitespaces characters such as \n) until it finds a double, so that first extra \n is discarded.
Java Stdin and Stdout II
You are viewing a single comment's thread. Return to all comments →
scan.nextDouble() skips over all characters (including whitespaces characters such as \n) until it finds a double, so that first extra \n is discarded.
HackerRank solutions.