Module08-Array Lab 2023
Module08-Array Lab 2023
1. Create a program using array that allows the user to key in and display 5 of their classmate’s
heights (without using any loop constructs).
2. Modify the solution from Question 1 to include while loop constructs to shorten the input and
output steps.
3. Modify the solution from Question 2 to allow the program to total up the heights entered and
provide the average height of the group of students.
5. Create a program based on the following output. The program assigns 5 numbers (between 1 –
20) and then ask the user to guess any one of the numbers set in the array. Please use arrays
with nested if else constructs to solve this program.
6. Create a program that prompts the user to key in 5 integer values into an array. The program then
displays the list of the integer(s) entered with description of whether the integer is divisible by 3
or not. Sample output is provided below. Please use arrays with for loop constructs to complete
this program.
8. Create a program that request for the user to enter a single word string. Following that, the
program will display their name with spaces in between the characters entered. Example of the
program output is provided below:
Use the concept of array with while loop construct to complete this program.
9. Create a program that requests for the user to enter a multi-word string. Following that, the
program will determine the number of words entered by the user based on the number of spaces
appeared in between the words. Example of the program output is provided below:
Use the concept of array with while loop construct to complete this program.
Use the concept of array with while loop construct to complete this program.