Print the sum of all the integers given as arguments to your Java program.
-
You cannot use the package
java.util. -
Your program can be a single file
Sum.javaor a zip file containingSum.java. -
Your program must use a method with the following signature:
public static int sum(int[] nums)
-
You are allowed to also submit a
readme.txtfile.
java Sum 1 2 3 4 # 10
java Sum 15 99 134 # 248This is the command to set up the grader in RamDesk.
python {{grader.file_path}} {{submission.all_file_paths}}