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, and in this video, in this exercise, what we are going to do is to write
a program.
OK, so why the program just inside of these eight main function that all this program is going to do
is basically to like to create a program that creates an array, let's say, of integers, and the user
is going to specify some inputs for this array.
OK, so let's say the user is going to specify the values for the array and then later on, once it's
done, we are going to check and to print if the array is sorted or not, we are going to check or check
if the array is like really sorted, OK, like really sorted, which means every element starting from
the left to the right is growing.
OK, or is that like sorted, please.
Pleased that the element on the right is at least equal to the element on its left or larger or not
sorted.
OK.
So it's basically I will give you one example.
So let's say your array has I don't know these values like one, two, five, seven and 10.
OK, so this array is basically like we will say, really sorted.
And that means that these arrays really sort that because every element starting from the left to the
right, you can see that the element on the right is greater than the element on the left.
OK, and this condition is basically satisfied for every pair.
OK, so this will be like really sorted.
And before we'll take another example, the example, number two, and we will take like this.
So one, two, two, five.
And let's say ten, then that's actually not very or not really sorted or very similar to the one either.
No.
However you call it, because you see there is at least one pair of of Nabor numbers that they do not
satisfy the condition that the element on its left is less than the element on its right.
OK, so the element on the right equals to the element on the left.
So that means that although there is a line of increasing.
OK.
So one, two, two, five, ten.
There is nothing like a decreasing from left to right.
So that's basically will be considered as sorted.
And also just a third example that basically all is not really sorted and not sorted at all.
That means that there may be like one, two, five, but there will be like three and ten.
So at least one pair of education numbers that do not satisfy the condition that the element on the
left is less than or equal to the element on the right.
OK, so this will be not sorted at all.
So three examples you can see here.
And basically, that's what you are required to do to write these simple notes program that will be
capable of receiving these inputs from the user and then basically to find out if it's really sorted,
sorted or not sorted at all.
OK, from the smallest to the largest.
So that's basically what we are going to do in this exercise.
So what I want you to do now is to take at least five, 10, 15 minutes and try to write these program
on your own.
I'm not using a separated in a different function for that because I'm not sure that it's appropriate,
at least at the moment, because now we are going to write everything in the main function.
And that's basically what you are required to do.
OK, so that's why you can see here, right, a program is not just a function, so get yourself ready
and start writing, because this video, once you are done, continue watching and check out the solutions.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.