Question
Make a program as follows; Define 2D char array (5 by 5) and initialize with asterisk mark. Repeatedly display the array using while loop. *
Make a program as follows;
Define 2D char array (5 by 5) and initialize with asterisk mark.
Repeatedly display the array using while loop.
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
Define two int variable y, x that represent y, x coordinate (row and column index) and initialize as 2 and 0.
y = 2, x = 0;
In each iteration of the while loop, randomly move to sweep *s.
For example, once @ moves to next column ([y][x+1]), assign a blank on the array [y][x] and assign @ on [2][1]
When all * are removed, the while loop is terminated.
MAKE THE CODE FOR THE PREVIOUS PROGRAM USING THE FOLLOWING LINK AS AN EXAMPLE WHILE STILL FOLLOWING THE GUIDELINES: https://www.youtube.com/watch?v=RZ206gReXcc (JAVA LANGUAGE!!!!)
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