Advertisement
knyazer

Untitled

Dec 8th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. Scanner sc = new Scanner(System.in);
  2. int n = sc.nextInt(), res = 1;
  3.  
  4. int[] arr = new int[n];
  5.  
  6. for (int i = 0; i < n; i++)
  7. {
  8. arr[i] = sc.nextInt();
  9. res *= arr[i];
  10. }
  11.  
  12. System.out.println(res);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement