All language subtitles for 10. Challenge 2 - Solution 2

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

All right, guys, so let's get down to business right away.

So we want to write a program that we'll find that we'll find the maximum and the minimum values between

two numbers.

All right.

So, for example, for example, let's make a quick example here.

If we have two numbers.

These numbers should be of a floating point type.

So, for example, the first number is three point five and the second number is 5.2, like you've seen

previously.

Then we want to print a message like this that we want to bring two messages.

Actually, the first one is maximum.

Maximum.

Equals two 5.2.

And the minimum minimum equals two three point five.

So these are these are the two messages that I want to see on the screen.

All right.

So let's go.

First of all, let's remove let's remove these comments and let's create we need to create two variables

of a floating point type.

So we just type float load.

Right.

Float number one and number two.

Then right after we've created them, we will read the values from the user and store them inside of

variables num one and two.

All right.

So print f enter number one, semicolon at the end.

And also we will print the same message for an arm to us or print f enter number two.

And now we are going to read, to read to see is their function scan F to read the value from the console

and storeyed inside of number one.

So for that we are going to use scan F percentage, not D but rather a percentage F because we are using

a floating point type.

And then we are going to specify the address of number one, the address of number one.

And we will do the same also for NUM two.

All right.

So now to scan F percentage F and store the value inside of the variable and two.

And now at this point, we have both of our variables holding two values and we can just print them

right away.

Right.

We cannot print maximum equals two now.

One and or minimum equals two.

Um, two, because we don't know what each variable holds.

Either we say higher or lower number.

So for this, we are going to use a condition that will check which variable number one or number two

holds the higher value.

So it goes like this.

If no one greater than NUM two, then we know for sure who is the maximum.

Between these two numbers and also we know who is the minimum.

Between these two.

Right.

Because either it's one of them is either either is higher than the other one or it's lower.

Basically, we are not taking here the case if both of them are equal.

All right.

We are just leaving it as living it aside for now.

So if that's the case, we are going to open a block of commands.

All right.

An associated block of commands that will be executed if the result of this condition happens to be

true.

So we are going to print two messages here.

The first one is print F and we are going to use maximum value equals two percentage.

F.

Make sure you don't specify here percentage D because we are using a floating point type.

And of course a backslash and at the end.

And we are going to specify here that instead of these percentage F, we are going to use num one because

it's greater than num to end.

It holds the maximum value.

And also we are going to write pretty much the same message.

Just to explain where the minimum is for it.

So minimal.

Equals two percentage.

F also backslash and but now instead of num one, we know that minimum will be in a will be stored in

the variable num two.

So the value is going to be story number two because number two is definitely less than NUM one.

So it will held the minimum value between these two numbers.

And now we should also specify the elf's section, what will happen if the result for this condition

happens to be false.

So here we go again.

We specify that a block of commands and we go to print out that the maximum right now, if this condition

is false, then definitely no one is at least equals to num in Vietnam to at least equals two num one,

or it may be higher than num one.

Then we will assume that maximum is number one.

So percentage f backslash n backslash.

And and if we specify the variable now two and we go the same way, let's copy and paste that, that

the minimum in the.

Case will be won and very know, we can say that we are done with this program.

And if the result of the condition.

Just to summarize it once again, if the result of the condition is false, meaning that no one, no

one was not higher than none to, then we would print we would print the maximum the maximum value of

NUM two and the minimum value of one.

Am just less things to mention here.

No, that's okay.

We talked about it.

So let's just build and run it.

So no one is going to be three point two and number two, he's going to be five point seven, let's

say.

So here we can see maximum equals to five point seven and minimum equals two three point two.

If we tried to do another example, let's say that we use now, one equals to ten point five.

And num two equals to nine point six.

Then we know that the expected maximum value is ten point five and the minimum is nine point six.

So let's see if that's the case.

Yes.

And our program actually finds out exactly what is the maximum and what is the minimum between these

two numbers.

So you've developed a quite a nice program here, and I hope you're proud of yourself.

You keep moving forward.

So that's it for these video guys.

And I'll see you in the next one.

Have a nice day.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.