0

How to express a condition of the value's change of variable in a loop?

I want to assign 1 to "a" if "q" will be changed while a loop. It doesn't matter how "q" was changed while a loop the point is to express this fact of change and write a condition: if q will be changed then assign 1 to "a" https://code.sololearn.com/cnBQFCYmT3DF/?ref=app

11th Jan 2018, 10:15 AM
Yura Tarasov
Yura Tarasov - avatar
2 ответов
0
Since I'm having trouble understanding your code and description of problem, I'm going to state what I think you want. q is to count the number of times the highest number is listed in the input line. a is to become 1 each time q changes.
11th Jan 2018, 1:37 PM
John Wells
John Wells - avatar
0
John, your understanding is correct, can you give some advice how to do it within a loop?
11th Jan 2018, 5:13 PM
Yura Tarasov
Yura Tarasov - avatar