Guest User

Untitled

a guest
Jun 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. public class Sum {
  2.     public static void main(String[] args) {
  3.         long sum = 0;
  4.         String[] temp;
  5.         for (int i = 0; i < args.length; i++) {
  6.             temp = args[i].trim().split(" ");
  7.             for (int g = 0; g < temp.length; g++) {
  8.                 sum += Integer.parseInt(temp[g]);
  9.             }
  10.         }
  11.         System.out.println(sum);
  12.     }
  13. }
Add Comment
Please, Sign In to add comment