Why Integer.parseInt(s) method summarize only the first number? (Instead of all the numbers entered?)
Scanner in = new Scanner(System.in); System.out.println("ะะฒะตะดะธัะต ัะธัะปะพ ะพั 1 ะดะพ 10"); int count = in .nextInt(); System.out.print("ะะฒะตะดะธัะต" + " " + count + " " + "ัะธัะตะป, ัะตัะตะท ะฟัะพะฑะตะป"); Scanner scan = new Scanner(System.in); String str = scan.next(); String[] numbers = str.split(" "); int res = 0; for (int i = 0; i <= count - 1; i++) { for (String s: numbers) { res += Integer.parseInt(s); } } System.out.println("ะกัะผะผะฐ ัะธัะตะป= " + res);