Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
What is going on, guys, so another amazing exercise in our programming course and in this exercise,
what we are going to do is simply to write a program that receives an integer that represents seconds.
OK, very similar to one of our previous exercises, I think in the previous chapter, in the previous
section, we also use that.
But here we will make some upgrades in some editions with probably using the conditions.
Right.
So write the program that receives an integer representing seconds, and the program should convert
the given seconds into, first of all, total hours, total minutes and remaining seconds.
And one important thing about this exercise is that your program should print the result in the following
format.
So that's the main main idea behind it, to print it in the following format and not like just like
we've done it previously.
We found the hours, the minutes and the seconds just by converting the main seconds that we received.
But here we will need to print the result in this format.
So hours, minutes and seconds, we will need to print it like these nice little clocks, if you remember,
or maybe some of you still have them.
So that's how we should print it.
And although it seems to be pretty easy and pretty straightforward, there are a couple of notes here
that let's talk about them.
Let's just see this nice example.
So seconds, for example, is for a thousand.
Then we know how to receive ours.
We know how to receive minutes, and we also know how can we retrieve the remaining seconds out of it.
We talked about it in one of our previous exercises.
It was very similar to this one.
You just accept that now we are going to use this information to print all the time in these following
format.
So the final result should be zero one zero six forty.
And one of the things that you need to understand is if, for example, the number of hours was like,
I don't know, 11, there is no problem.
We should simply print the hours.
But what happens if the hours is less than 10?
Then we still need somehow to print this zero before the one in this zero before the six.
OK, so that's the whole idea about this exercise.
So the printed result should not be one six forty.
It should be zero one because do let's say two places, two digits for the hours, digits for the minutes
and do the jets for the seconds.
That's what we are going to to use.
So basically in this exercise, the arrangement of the zeroes here matter.
OK, so that's basically what I have to tell you as part of the requirements for this exercise.
Take your time.
Think about it, how you should tackle it, how we should solve it, and how basically you should print
every value that you will receive in the following format.
So until next time, I will see you in the Solutions video.
This is Alphatech by.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.