All language subtitles for 8. isOdd Function C Exercise

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, so we're back and in one of our previous examples, I think it was in our previous video,

hopefully if everything is arranged correctly, we talked about how we can implement these even function.

Any of these video I want us to do is simply to implement another function in this function will be

called Is Khaled OK?

This will be the name of the function.

And this function will what it will do is just this function will receive an integer, OK, and it will

return one if this given if this given number is order.

All right.

And otherwise if it's not odd, meaning if it's if this number is even otherwise, this function should

return, should return zero.

OK, so if it's even if it should return zero.

All right.

And I want you to take also a few minutes to think about it.

I think it's very trivial to solve it.

We are going to solve it in two different ways.

So start with the most basic, with the most intuitive solution and simply write write it down pretty

much like you've done it for even just change a couple of lines to make it suitable for is odd.

OK, so take a few moments and we will continue right away.

Awesome.

So let's start in.

The signature of the function is going to be pretty much the same except just the function name.

So it is odd and the function is going also to receive a number.

So it's not like we do not really care about the fact that these function uses these even are this function

is even is using enum and also that this function is odd is using enum.

Basically, we know that these functions can be treated like different rooms and different rooms have

their own naming for the values they are using.

So it is odd and the function goes like this.

So if no modulo two does not equal to zero, which means it is an odd number, then in this case simply

a return one.

Otherwise return to zero.

OK, so pretty much almost the same solution as it was previously.

Just that here we used the inequality sign and here we used the equality sign.

Here it was regarding even numbers and here it's regarding odd numbers.

OK, so if the result of the condition here is true, then these will be executed and it will mean that

the number itself is even in here.

It will mean it's odd.

OK, so I hope this standard solution is clear to you.

And I'm going to show you also additional option to how we can, instead of writing down the body of

this function like this, how we can use the fact that we how we can call this function is even and

implement these odd function by using these even.

OK, so that's right.

Additional function called is odd number two and it will simply look like this.

So isn't odd.

It is odd.

Let's call it two and it would receive also none.

And now what this function is going to do is simply to call the even function and to basically to decide

what it should return based on the result given from is even function.

So for that, let us go like this, so if is even returns us one for a number, right?

So if it returns this one, it's right down in the parentheses here.

OK, so if it returns this one, then what it means is that the number is even an hour is odd to should

return to zero.

Right.

Because it's odd returns zero if the number is even.

So based on the call of this function is even with numbers.

We know that, we know that these function returns one only if it's an even number, then in this case

this is all the function should return zero else we know or else we know that the function should return

one.

So is that clear to you guys?

What do you think?

Do you agree with the second solution?

I agree that the first one looks easier, but here you practice the way you call another function.

OK, so first of all, you will call these are two, you will give it to another.

And here behind the scenes, this function will use a totally different function to like to calculate

something or to check out something in based on the result of this function, you will return some value

of this current function is odd to.

So I hope this is clear to you because that's also very important.

Like to grasp the idea of calling another function from a given function.

And that's something you're going to do a lot in your programming career because you're going to write

also complicated functions that will require the usage of other other functions in order to construct

them.

And with that being said, guys, I hope you like this video.

Let me know what you think of it.

If you have any questions, leave some review.

And of course, as always, and we'll see you in you in the next video is I think there are a lot of

prak.

There is a lot of practice to us.

I'll see you then.

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