Developpement/23DEV1.1/TPS2/TP01/Introduction/Sommes.java

11 lines
227 B
Java
Raw Normal View History

2024-12-09 11:53:11 +01:00
public class Sommes {
public static void main(String[] args) {
int n, result = 0;
for(int i = 0 ; i < args.length ; i++){
n = Integer.parseInt(args[i]);
result = n + result;
}
System.out.println(result);
}
}