my output sud b a name(like john smith:age) & his age should change automatically ( 10 times,startin wid 10 ending wid 20),every second/every minute ,& after 10 changes it has to stop,IN V C++ can anybody help me with the code?
eg: john smith: 10(after one second/one minute)
john smith: 11 " "
|
|
|
|
|
|
john smith: 20 (stop)
Add #include <windows.h> at the top of your program. In a for loop, int age=10;age<=20;age++, have a Sleep(1000) for 1 sec, or Sleep(60000) for 1 minute. When printing out age, it'll increase after the sleep cycles