Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner scan = new Scanner(System.in);
- int number = scan.nextInt();
- int sum = 0;
- for (int i = 0; i <number ; i++) {
- int chislo = scan.nextInt();
- sum = sum + chislo;
- }
- System.out.println(sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement