Question: My code is actually longer than this. It was compiling with no errors and executing just fine, until randomly it stopped executing. I did a

My code is actually longer than this. It was compiling with no errors and executing just fine, until randomly it stopped executing.

I did a new program and went line by line, and noticed that when I include the while loop shown it executes a blank screen. The purpose of the loop is to make sure the the second set of rand numbers are not equal to the first before printing to screen.

What am i doing wrong?????

EDIT: I originally had && instead of ||. Image shown was just me trying to see if it made a difference.

My code is actually longer than this. It was compiling with no

#include #include #include #include using namespace std; o o poto co Jo int main() const int SIZE = 10; int O_x, O_y, P_x, P_y; int locate_x, locate_y; o o string username; char ready, locate; o Poin co srand(time(NULL)); O_x = rand() # 10; O_y = rand() $ 10; o o P_x = rand() P_y = rand() 10; 10; wwwwwwwwwwmmmmm Polo o while (P_x != 0_x || P_y != 0_x) P_x = P_x; P_Y = P_Y; cout

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!