SHARE
TWEET

Untitled

a guest Sep 19th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class SumDouble {
  2.     public static void main(String[] args) {
  3.         double sum = 0;
  4.         for (String arg : args) {
  5.             for (String token : arg.split("\\p{javaWhitespace}")) {
  6.                 if (!token.isBlank()) {
  7.                     sum += Double.parseDouble(token);
  8.                 }
  9.             }
  10.         }
  11.         System.out.println(sum);
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top