Integer numElements is read from input and represents:
• The number of elements in each array.
• The number of pairs of integers read from input.
Declare two integer arrays, groupNumbers and tipsPaid. Then, read each pair of integers from input. For each pair read, store the
first integer into groupNumbers and the second integer into tipsPaid.
Ex: If the input is:
3
5 32 8 46 6 33
then the output is:
Group number: 5, Paid: $32
Group number: 8, Paid: $46
Group number: 6, Paid: $33
1 import java.util.Scanner;
2
3 public class CashRecords {
4 public static void main(String[] args) {
5 Scanner scnr = new Scanner(System.in);
6 int numElements;
7 int i;
8
9 numElements = scnr.nextInt();
10
11 /* Your code goes here */
12 for (i = 0; i < numElements; ++i) {
13