Created
October 22, 2017 23:05
-
-
Save MukulLatiyan/7c060afbb8ec0ededd042284b3f5ea2e to your computer and use it in GitHub Desktop.
Multiply Array(GeeksForGeeks)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment