0

Countdown wont work

my code: void rain(){ cout<<"\n"; for(int d=0;d<5;d++){ int g=(1+rand()%20); for(int i=0;i<g;i++){ cout<<" "; } cout<<":\n"; for(int o=0;o<g-1;o++){ cout<<" "; } Sleep(1000); cout<<":"; } could someone tell me why this wont work?

17th May 2018, 9:20 PM
frank
frank - avatar
4 ответов
0
g has no value
18th May 2018, 2:14 AM
Manuel Soto
Manuel Soto - avatar
0
Manuel Soto actually it does look at the 4th line down in the code.
18th May 2018, 3:53 AM
frank
frank - avatar
0
I didn't see it. it was late. it doesn't works depends on the acceptance criteria. what is the expected output?
18th May 2018, 11:24 AM
Manuel Soto
Manuel Soto - avatar
0
Manuel Soto it should be like : : every like millisecond or second
18th May 2018, 11:29 AM
frank
frank - avatar