All language subtitles for 5. Finding Maximum - Implementation in C!

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

What is going on, guys?

You're an Alphatech C programming chorus.

And in this video, we are going briefly to go over the implementation of our last example, where we

discussed how we are going to find the maximum between given two numbers.

So, first of all, as usual, we start with adding the includes, then add the end main section, your

entry point, create two variables, number one.

And number two, to hold the values read from the user.

Then we should print some guiding message for the user.

That will help him in understanding exactly what he should do.

And now we are going to read these two values, one off through the other two years to scan our functions.

When the first one reads the value for NUM one and the second scan of functions for SCANA function for

number two.

And now we use our condition.

If no one is greater than NUM two.

And if that's the case, we know that no one will hold the maximum.

Right.

That's why we should print its value.

So we simply use the print F and we just specify Max equals two percentage D and instead of percentage

D. We know that it will be replaced by the value of NUM one, which is in this case the maximum value.

Otherwise else we will print the value of NUM two because we know that definitely num one is not greater

than num two in this case.

And at the end of course, we will specify the return zero.

That simply tells that our program has been terminated successfully to the operating system.

All right.

So I hope this structure is clearer to you guys.

And now I want us to go over the flow of the code line by line, exactly as we've seen it previously,

to see the exact commands that are being executed for the two different examples.

So all the lines of code until the condition are nothing special.

We already know exactly how to do them and how to write them.

Nothing special here.

So let's just assume that no one in this case will be down and NUM two will be five.

OK.

Meaning that there will be two variables behind the scenes.

Number one.

And number two.

And number one will hold the value of ten and num two will hold the value of five.

And now let us use the condition and check if the value in variable on NUM one is actually greater than

two.

So if that's the case, we are going to execute this line of code.

And basically, once we've executed this command, we are going to skip the yellow part and just return

zero as we always do.

And we can actually say that that see it.

Your program found out.

What is the maximum.

Between these two values when the result of the condition was true.

All right.

Good job, guys.

I hope you keep up with the pace.

I tried to summarize this topic, but yet to give you a lot of details, a lot of information and to

go out with you line by line and show you actually how these conditions are actually executed.

Behind the scenes.

So I hope you're with me on that.

So just to summarize all of these execution, if we viewers to numbers five and seven, then these message

of marks equals to seven will be printed on the screen.

And now let's see the flow of the program with the value of NUM.

One is not greater than the value of number two.

So the steps are pretty much the same as previously.

Starting at the main reading, the values from the user, let's say that here the first value will be,

let's say three, which will be stored in NUM one and the second value will be five, which will be

stored in two.

So now the result of the condition.

If no one is greater than NUM two, we'll be false in such a case.

Right.

And if it's false, if it's false, that means we go through the yellow section right away.

We simply skip the previous print f right.

Because it relates thirith situation where and the condition was true.

So now we should simply execute these particular print F and just specify that Max equals two percentage

D and give the value of NUM two, because we know that currently number one is not greater than NUM

two.

That's why we came here to the yellow section.

And there you go.

You can try running this code on your own.

Use a couple of example.

Use a couple of different values.

Just play with it a little.

Make sure.

That everything works just as you've expected it to work.

And also tried to check and understand what will happen, what part of the code will run, and basically

why, if the user uses two numbers, which are the same.

For example, five and five.

So, as always, thank you guys for watching.

And I'll see you in the next video.

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