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?
I hope you are good and in this exercise, this exercise actually is going to be very similar to the
previous one.
We are going to write an official program that receives a noun from the user.
And what this program is going to do is to calculate and print the sum of all the numbers from one up
to.
OK, that can be divided by three or divided by five.
OK, so previously we had a little bit different program.
It was instead of these or we used and OK, so all the numbers that could be divided by three and by
five and now it's just enough for us if a given number can be divided by three or by five.
And if that's the case, we simply take it and use it inside of our sum as part of the sum and then
print the final sound to the screen.
So if, let's say we received NUM equals to you, I don't know a hundred like previously, then we know
that one, two, three, four, five, six and so on, right up to a hundred.
Then in this case we will take three and also we will take five and also we will take six and all the
numbers that can be divided either by three or by five.
OK, so we will take them and add them to our final some awesome.
And what I want you to notice is that once again here we will do these program, will try this program
in two ways.
The first way will be the trivial option.
OK, so it will be there will be a trivial option and also there will be an efficient option.
OK, so think about two solutions for this exercise.
Try to make some conclusions out of the first one.
OK, of the previous exercise, when we talked about the solution, the optimal solution and the difference
between the optimal and the optimized solution versus the trivial one, and try to come up with two
ideas here.
The first idea should be less trivial, pretty much the same as previously.
And there will be also an optimized solution that you should take into account.
So, yeah, this is it for this video.
Guys, thank you so much for watching.
And let's go solve this exercise together.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.