Hash Fellow robcat2075 Posted November 6, 2023 Hash Fellow Posted November 6, 2023 Arrays let you store a set of data under one name. Arrays can be a set of almost any data type, even one you created your self. Sample Project Write a program that prompts the user for 5 items of data, then prints the 5 items back out. Example output... I'm Using Arrays! ---------------- Enter a name: Crusty Enter a name: Dusty Enter a name: Musty Enter a name: Lusty Enter a name: Bartholomew These are the names you entered... Name 0 Crusty Name 1 Dusty Name 2 Musty Name 3 Lusty Name 4 Bartholomew Done! John Purcell suggested a program that stores the multiples of 12 in an array and then prints them out. The output might look like this... Twelves! the multiples of 12 are... 12 x 0 = 0 12 x 1 = 12 12 x 2 = 24 12 x 3 = 36 12 x 4 = 48 12 x 5 = 60 12 x 6 = 72 12 x 7 = 84 12 x 8 = 96 12 x 9 = 108 12 x 10 = 120 12 x 11 = 132 12 x 12 = 144 Done! Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.