MukulLatiyan
10/22/2017 - 11:05 PM

Multiply Array(GeeksForGeeks)

Multiply Array(GeeksForGeeks)

//Java Code for geeksforgeeks problem named Multiply Array in array section school level.
import java.util.*;
import java.lang.*;
import java.io.*;
class GFG
 {
	public static void main (String[] args)
	 {
	    Scanner s = new Scanner(System.in);
	    int ntest = s.nextInt();
        while (ntest-- > 0){
            int size = s.nextInt();
		    int prod = 1;
		    for (int i = 0; i < size; i++){
		        prod *= s.nextInt();
		    }
		    System.out.println(prod);
        }
	 }
}