Declare and initialize arrays store the numbers


Assignment:

Array Basics

1.) Write array declarations for each of the following:

a. Eight grade point averages

b. Five first names

c. 21 ages

2.) Declare and initialize arrays that store the following:

a. The whole numbers 9, 36, 36, 54, and 65

b. The last names Smith, Johnson, and Hanson:

c. The price 12.00, 101.00, and 3.50

3.) Write an assignment statement that assigns the value 999 to the first element of an array of integers named idNumbers.

Searching An Array for an Exact Match

1. Is the for loop written correctly? If not, how can you fix it?

2. Which variable is the flag?

3. Is the flag variable declared correctly? If not, what should you do to fix it?

4. Is the comparison in the if statement done correctly? If not, how can you fix it?

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Declare and initialize arrays store the numbers
Reference No:- TGS01934399

Now Priced at $25 (50% Discount)

Recommended (97%)

Rated (4.9/5)