0
what is missing from my code ? đ
3 Answers
+ 6
https://code.sololearn.com/cbIZ2XwM92GO/?ref=app
+ 6
The random number is generated outside of the loop, so it will print the same character each time.
Change it like this to generate a new character each loop:
for ( int i=0 ; i<=N-1 ; i++ ) {
alea = rand()%( 52-1 +1 ) +1 ;
cout << caract[alea] ;
}
+ 3
thank you Rstar and Anna đ