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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!