Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.lang.*;
- class Main
- {
- public static void main (String[] args) throws java.lang.Exception
- {
- Scanner sc = new Scanner(System.in);
- List<Integer> liczby = new ArrayList<>();
- while(sc.hasNext())
- liczby.add(sc.nextInt());
- int print = 0;
- for (Integer liczba : liczby)
- System.out.println(print += liczba);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement