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
All right, so in this video, this amazing challenge, what we are going to do is to write a function
that receives a date variable representing some given date, OK, based on our previous examples, very
similar.
And these functions should find and print the next day on the calendar.
So if you're a date is something like 1st of October, 2001, let's say that's of a current date.
Current date is simply like, I don't know, first of October, October 2001, then the printed result,
the next date, the printed result should be should be something like 2nd of October, 2001.
And while that's very simple, there are some cases that students find it hard to make this program
and to answer this challenge.
So my task to you guys, my request is before you move on and like view the whole solution that I'm
giving to you, stop this video, take 20, 30 minutes, try try to write this program on your own.
And once you are ready, once you are done, proceed with this video and make sure and see where you
did one thing and I did another thing and trying to understand where is the difference.
And if everything works correctly, then I think you are proceeding very well.
And if not, make your notes, write your remarks and try on practicing even further.
All right.
Okay.
And now I help.
You are back and you are full of energy and you gave it a shot on your own.
So what we want to do right now, I will still leave everything that I've created previously, the type
struck date, as well as the print, the function, as well as the input date that is responsible for
getting an input from the user.
And what I'm going to use in the main function is simply, let's say, to create a new date.
Simple as that.
And what will be the type of this function?
So first of all, let's say that the type of this function will be void.
So void prefect's date, date DETI, for example, we're receiving a date variable.
Now, what we have to do is to think about the logic behind the scenes as to how to find the next day.
And it's and also taking into account that all of these days that all of these days may also come to
this point thirty one, twelve months and the year and so on.
OK, so the first thing that we have to do is to use something like that date day equals D.T., Dotti
plus one.
OK, we are incrementing just by one.
So deti dot day plus plus would also work here.
OK, and now we are going to ask a simple question.
So awesome.
I think that now we've managed to cover everything here.
Also guys know that there are a lot of a couple actually of ways to solve this exercise.
Also by taking into account the exact month of like month that have 30 days and months and months,
that they have thirty one days.
But the function itself simply will be a little bit longer and you will simply have to use now probably
the best way will be to use switch cases and to like take January as having thirty one days and then
taking the next month, thirty and so on, so forth.
And you know, like taking into account that they are maybe once in four years.
Right.
Twenty eight and twenty nine days in February and so on.
But that's not something that we are going to do right now.
What we wanted just to see what kind of logic of how you find out and print the next day.
And last thing do we have to add here is like something like that or print f the next day is OK and
you simply print use the function print date to print our ADT, our outdated date.
And there you go.
So guys, run this program on your own.
Take some notes.
Right.
And let me know if everything works for you correctly.
If you have managed to make this exercise successfully on your own, if you found this information useful.
And also what I wish you, as always, have a great day and.
Keep on practicing, I'll see you next time.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.