Please input an int (or control-d when done): 0 Please input an int (or control-d when done): 10 Please input an int (or control-d when done): 20 Please input an int (or control-d when done): 30 Please input an int (or control-d when done): 40 Please input an int (or control-d when done): (The user typed a control-d.) Here are the 5 ints that you input: 0 0 1 10 2 20 3 30 4 40 0 10 20 30 40