Dec 5, 2012 at 1:53pm UTC
maybe you should listen to coder777 and me and use seconds and a for loop.
if you still want to print the minutes and hours, you can use the modulo operator "%"
Dec 5, 2012 at 2:06pm UTC
Im sorry... i do not know anything about anything of what you said.... still learnin'
Dec 5, 2012 at 2:19pm UTC
Will someone translate into english please :D add some comments or something
Dec 5, 2012 at 2:25pm UTC
Last edited on
Dec 5, 2012 at 2:27pm UTC
Dec 5, 2012 at 3:23pm UTC
What i do not understand:
modulo operator %
i give up... ill take an easier task...
Dec 5, 2012 at 3:32pm UTC
you do not need the modulo operator %
the for loop can be expressed as a while loop:
for( int i = 0; i < amount_sec; ++i)
can be replaced with this:
2 3 4 5 6 int sec = 0;
while( sec < amount_sec)
sec = sec + 1;
As you can see: the for loop is just a convenient syntax
if you give up that quick you won't get far...
Last edited on
Dec 5, 2012 at 3:40pm UTC
Dec 5, 2012 at 3:35pm UTC
if you have problems with the loops. try to set up an 10 elements array and print each element with a for, a while and a do while loop.
it will give you an idea how to change them to receive the same result.
the mudulo operator returns the rest of an integer division
so 5 % 2 is 1, since 5 - (2*2) = 1
Dec 7, 2012 at 2:38pm UTC
the problem is, im 13 years old and my native language is not english so im having problems learning stuff in english...