#include #include #include #include…

Question Answered step-by-step #include #include #include #include… #include #include #include #include #include using namespace std;int main() {size_t seed = time(nullptr);default_random_engine e(seed);uniform_int_distribution u(1, 1000000);int fwidth = (int)log10(u.max()) + 1;int number = u(e);int count = 1;while (number != 1){ cout << setw(fwidth) << count++ << ' ' << setw(fwidth) << number << endl; if (number % 2 == 0)  number = number / 2; else  number = 3 * number + 1;}cout << setw(fwidth) << count << ' ' << setw(fwidth) << number << endl;return 0;} The program above theoretically stops for any positive number. Practically, it will crash if the number is too large but we won't worry about that. It will also halt any negative number too. One of the stopping conditions is "number == -1". There are two others that you will find by running the program many, many times. default_random_engine e(seed);uniform_int_distributionu(1, 1000000); …number = u(e);generates a random number between 1 and 1,000,000. You would like to generate random numbers between -1,000,000 and 1,000,000. Modify the while loop condition so the loop stops for 1, -1, and 2 more negative numbers. You should not have to change the body of the loop. What are the other two negative numbers? Computer Science Engineering & Technology C++ Programming COMPTNG 16A Share QuestionEmailCopy link Comments (0)