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 welcome back to another example.
And in this video, we're going to write a program that will get two values to inputs from the user.
Let's call it number one and number two.
And then the program will simply display the maximum between these two values.
So simply saying we're going to ask the user to insert two numbers and then we are going to read them
and store them in two variables, let's say number one and number two.
So, for example, if the user said that no one is going to be five and that number two is going to
be seven hours of programming, such a case should just print the following message marks equals to
seven.
Is it OK so far?
Just printing out the highest number between the two.
And basically, you cannot do it without using conditions.
I guess you can try, but most likely you will encounter with some difficulties on the way, which could
be solved very easily using conditions in just the note, guys, that we can not just print on the screen
both numbers.
I mean, we cannot print just five and seven and let the user see both of them and decide for himself.
That's not the goal of this program.
We don't want to print them both.
We just want to print the one with their highest value.
And that's exactly where we need to make some comparison between these two between these two numbers.
And based on the result of this comparison of this condition, we should print the appropriate message
to the screen.
So we need to ask the following question if number one is greater than two.
And if that's the case, meaning give the condition, if the result of the condition is true, then
we should print on the screen max equals and the value of now one.
Otherwise, I mean, else we can conclude that no one is not greater, not higher than NUM two.
So for sure we can say that num two equals or greater than num one.
And we can print the following message marks equals and specify the value of NUM two, which in our
case is simply seven.
So you check the condition if number one is greater than NUM two and based on the result of this condition,
you do, one of the following options is the result of the condition was true.
Then you simply print marks equals two.
Now one is you can see on the left side of this branch.
And if the result of the condition was not true, which means it was false because a condition result
can only be true or false.
It cannot be.
Maybe.
Or a hide and no result.
And if it was false, then we will have to run another code that is associated with this result.
And simply print marks equals to the value of NUM two, which you can see on the right side of this
branch.
So that's easy for these video guys.
And as always, I want to give you as much practice as possible.
So let's take a quick look at the next video where we are going to briefly go over these exercising
our programming language.
So I'll see you there.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.