Question
Step 1: Write a program with two functions: InitArray() and PrintArray() . The program should create a 10 by 10 array of random integers (1
Step 1: Write a program with two functions: InitArray() and PrintArray(). The program should create a 10 by 10 array of random integers (1 - 100) in InitArray() and display the array in PrintArray(). (No global variables.)
Step 2: Create a bool function FindNumber() that accepts a number and returns its first location in the array.
Step 3: Add logic so that the user can guess a number and have the program return a message stating higher/lower for the x and y coordinates until they guess the number.
Bonus Step: Modify InitArray() so that no numbers are duplicated and change the logic so that the computer chooses the number and the user guesses the location.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started