0
Проблема с кодом на языке C++
Цикл for выполняется рандомное количество раз https://sololearn.com/compiler-playground/c4Gpz20F2ACA/?ref=app
4 Antworten
+ 2
The loop does repeat 10 times, but it might not print 10 times because case 2 only prints when random_number_1 > random_number_2. Check the positioning of the if statement. Possibly it should be moved down a few lines?
+ 1
The code runs well. What is the problem that you see?
+ 1
I solved the problem, the problem
is that " int random_operation = int random_number_1 = rand() %
rand() % 4 +1;
100+ 1;
int random_number_2 = rand() % 100 + 1; were written inside a for loop.
0
the cycle repeats a random number of times, but I want it to repeat 10 times