(String[] args)
| 3 | public class Problem4 { |
| 4 | |
| 5 | public static void main(String[] args) { |
| 6 | // TODO Auto-generated method stub |
| 7 | Scanner scan = new Scanner(System.in); |
| 8 | int[] sum; |
| 9 | int N; |
| 10 | char[] wordInArray; |
| 11 | |
| 12 | N = scan.nextInt(); |
| 13 | scan.nextLine(); |
| 14 | sum = new int[N]; |
| 15 | |
| 16 | for (int i = 0; i < N; i++) { |
| 17 | int individualSum = 0; |
| 18 | wordInArray = scan.nextLine().toCharArray(); |
| 19 | |
| 20 | for (char c : wordInArray) { |
| 21 | individualSum = individualSum + (int) c; |
| 22 | } |
| 23 | |
| 24 | sum[i] = individualSum; |
| 25 | } |
| 26 | scan.close(); |
| 27 | |
| 28 | for (int i = 0; i < sum.length; i++) { |
| 29 | System.out.printf("%d\n", sum[i]); |
| 30 | } |
| 31 | |
| 32 | } |
| 33 | |
| 34 | } |
nothing calls this directly
no outgoing calls
no test coverage detected