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
So let's start with our solution to find if this year is leep or not.
So first of all, let's create additional variable, a new variable and call this variable year.
Now, let's bring a nice message.
Print out after a year.
OK, so that the user will be able to specify what year he wants to check.
Then we are going to use this kind of function and to read this information and store it inside the
variable year.
Now, what we are going to do is simply to take our previous conditions that we talked about and try
to simplify them.
So the first condition, I will even start from the end and I will say that we will check if year can
be divided by 400.
OK, without a remainder, we can simply write equal to zero.
Then in this case, we can definitely say that the year is divided, can be divided by 400 without a
remainder and also by four without a remainder.
Write because 404, you know that.
And even if it's even we know that it can be divided by 100.
But still, if we know that it can be divided by 400, then that's a leap year.
OK, just a couple of terminologies, guys.
Nothing complicated.
That's the rules to decide if a given year is leap or not.
Nothing we can do about it.
So in this case, let's simply print this year or maybe percentage the year, for example, of two thousand
and whatever is a leap year.
OK, so that's the first message that we are going to use.
Backslash and of course and here we are going to print here.
OK, so we are good with years that can be divided by 400 without the remainder.
Now let's move on to if, for example, the result of this condition is false.
OK, and that means that the year cannot be divided by 400.
So in this case, we can say else if a year can be divided by a hundred without a remainder.
Right.
If we take a look at our explanation and it was the second condition that I showed you in the presentation,
then in this case, we can say that this year is definitely is definitely not the leap year, because
even if it can be divided by four without a remainder, but it still cannot be divided by 400, then
definitely this year is not leap.
So percentage percentage.
The year is not a leap year.
OK, here is specifically the year itself.
And there you go.
It's just correct.
These are awesome.
And now all that remains is basically to say that if the year cannot be divided by 400 without a remainder
and also not by a hundred, then in this case what we have to do is simply to ask the following question.
Else, if a year can be divided by four without the remainder, and if that's the case, then we are
going to print that the year is a leap, year is a leap year.
OK.
So basically these are just the rules defined for a leap years.
And one thing that we also need to take into account is what is the final Ale's?
So if, for example, the result for this condition is falls and four releases falls and releases falls.
So finally the last ls that takes the result of the remaining options will say that there are the lead.
The year is not a leap of course, because it cannot be divided by four and absolutely that's not a
leap year.
So I hope that's clear to you guys.
So we're forgot to return to zero at the end, just the specified.
So I hope that's clear.
That's how you find basically if a given year is leap or not.
And yeah, I think this is it.
Just remember that there are a couple of rules that you need to to check a couple of conditions.
That's not something that you like, you know, like know it and apply it on a daily basis, probably.
But since you know that you have to write some program and these programs should find if a year is leep
or not.
So your steps are, first of all to understand, OK, I'm going to write a program then to understand
what are the conditions for a year to believe or not in like general terminology is just like you've
seen in the presentation, and then simply to take these knowledged liked process it in your head and
once you are done.
Processing it simply will take this information and try to construct it in our programming language,
in this case, it's the C programming language.
So I guess, yeah, this is it for this video, guys.
Thank you so much for watching.
Keep on practicing and I will see you in the next video for us.
If you have any questions, feel free to ask them and we will do our best to assist you with whatever
you got.
So until next time.
My name is Ludde.
I'll see you then.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.