0% found this document useful (0 votes)
15 views

6 Basic Array Practise

The document outlines four basic programming exercises involving arrays. The exercises include creating a program to input and display medal winners, storing and displaying names, selecting a random raffle winner from a predefined list, and translating 'Hello' into different languages using an array. Each exercise emphasizes user input and array manipulation without the use of conditional statements.

Uploaded by

nathan fitness
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

6 Basic Array Practise

The document outlines four basic programming exercises involving arrays. The exercises include creating a program to input and display medal winners, storing and displaying names, selecting a random raffle winner from a predefined list, and translating 'Hello' into different languages using an array. Each exercise emphasizes user input and array manipulation without the use of conditional statements.

Uploaded by

nathan fitness
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic Array Practise exercises

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy