Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SumDouble {
- public static void main(String[] args) {
- double sum = 0;
- for (String arg : args) {
- for (String token : arg.split("\\p{javaWhitespace}")) {
- if (!token.isBlank()) {
- sum += Double.parseDouble(token);
- }
- }
- }
- System.out.println(sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement