Lab 7
Miniature Golf
Objective:
To learn about one-dimensional arrays of fixed length
To practice I-P-O (input-process-output) formatting.
Assignment:
Write a program that:
Contains 3 functions other than the main (main is not required in javascript)
Uses a one-dimensional array
That asks the user for their full name and the number of strokes taken on each hole of an 18-hole miniature golf course
Calculates the final score and how many holes-in-one the player had (holes where score is 1)
Prints out a scorecard
Remember when you pass your array it is always passed as a reference parameter, even if you are not changing its contents. Just be careful that you are not accidentally making any modifications. You can prevent it from being modified using const, but that’s not necessary in this class.
Sample Output
The output for your scorecard should look just like what you see below, with proper spacing and alignment. I have skipped many lines of input in the ...
Enter name of player: Tiger E. Woods
Enter the number of strokes for each hole.
hole[1]: 3
hole[2]: 1
hole[18]: 5
Tiger E. Woods, here is your scorecard:
Hole : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Score: 3 1 6 4 2 3 3 1 2 4 5 3 2 2 2 3 4 5
Your total is 55.
You scored 2 holes-in-one.
this is the prompt and what it should output i need help but it needs to look simple