6 Basic Array Practise
6 Basic Array Practise
1. Crankworx
Write a program which contains a small string array to hold 3 names. The GOLD, SILVER and
BRONZE medal winners of Crankworx 2017. Have the user enter the winners and then ask
them which one they wish to display as shown below.
NOTE: You can write this program without using an if or switch statement.
2. Names
Write a program which asks the user to enter in 5 names which are stored in an array, then
display the first and last name on the screen.
3. Raffle tickets
Write a program which stores 20 names for 20 raffle tickets sold. These names are to be put
into the array at the time of declaration. The program is to then pick a winning name at
random and display it on the screen, saying “THE WINNER IS…”
4. Hello translator
Write a program containing an array that holds 5 strings (Hello translations in 5 different
languages). Ask the user in which language they wish to see HELLO in.
NOTE: Again you can do this without using an if or switch statement.