CodePudding user response:
Write a recursive function using the count record the serial numberCodePudding user response:
Write a while (1), until the number is greater than b stops, and then within the loop with variable would
Int count=0;
Int a, b, c, d;
C=0;
cin> & gt; a> & gt; b;
While (1) {
If (c> B) break;
D=c;
C=a + c;
A=d.
count++;
}
cout<& lt;" There are "& lt; <(count - 1) & lt; & lt;" A ";
That should be what he did, are hand, playing is likely to go wrong