I need help writing a code in C++. Using the formula x_(n+1) =(a(x_n)+b)%m. User must enter input integers for a, b, m, x0, y0,n. Values for x0 and y0 need to be less than ‘m’. All integersentered must also be less than 100. Program should print how manytimes x0 and y0 switch and/or number of iterations it takes to makeone switch. y0 = a*(x_n)
Expert Answer
An answer will be send to you shortly. . . . .