Jump to content

pomoc Timer


Twixo

Recommended Posts

new str[12];
format(str, sizeof(str), "%d:%02dmin", pocet_sekund/60, pocet_sekund%60);

Za pocet_sekund si dosaď kolik zbývá sekund a pak máš ve stringu str výsledný text.

Edited by Lukasz
Link to comment
Share on other sites

máš minuty sekundy, tudiž si uděláš 2 proměnné např new M,S;

 

pak akorát ubíráš z proměnné S, tedy S --; až se bude rovnat 0 hodíš ji zpět na 60 a odebereš od minuty. pak až se bude rovna minuty 0 a sekundy 0

tak akorát ho propustíš.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...