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
Welcome back and let's start solving this exercise together, shall we?
So the first thing that we need to understand is that we will have X and Y, OK?
And based on the values of this X and Y, we are going to determine in which quadrant they are located.
So the first case, let's say Ward ran one.
What we have to understand is what's special about this quadrant.
So the special thing about it is that both, OK, both X and Y have positive values.
Right.
And if we want to talk about quadrant two, then in this case, let's want to rent to then in this case,
what can we say about it?
What's special about the second quadrant?
And the special thing about it is that X will be negative.
So X has negative value while Y will have a positive value.
So why has positive value?
OK, so that's quadrant two and also let's do the same fourth, quadrant three.
So what's special about quadrant three is that both once again, X and Y have what, not positive values,
but negative values.
Right.
That's what's special about it.
And finally, we have also the Quadrant four.
And in this case, we will say that X has positive ratings, positive value and Y has negative value.
OK, so it has a positive value and Y has a negative value.
So basically what we've done right now is we've classified the information about each of these quadrants
and now we have finished the theoretical explanation.
Let's say this way and we are ready to start writing our program in our C programming language.
So the first thing that we need to do is just to create these two variables and X and Y.
OK, and now we are going to use the printf command to specify the user enter X and Y, OK?
And then in this case, the user is going to insert both of them.
So let's just read them together using percentage, the percentage in storing it inside of variable,
inside of variable X and variable Y.
OK, so these are we simply going to insert X and Y, you just space some space between their values
and we are going to read these values and store them inside variable X and Y, and later on we will
start asking the following conditions to make sure if this point of X Y is either on the score of the
quadrant, this one, this one or that one.
So let's start asking the questions.
Asking the conditions in the first condition is going to be very simple.
We know that Quadrant one has both of the values is positive.
So if OK, if let's say if our X equals no positive and OK and Y is positive.
Right.
That's what we said about this condition.
If both of them are positive, then in this case we can say that this point is located at quadrant one.
So let's bring a nice message.
Printf the point, what was the percentage B percentage is located in there?
Let's say first we want.
OK, so very simple.
Nothing complicated so far.
Instead of the first percentage, we will use X in the second one, Y, and that's it.
So if both of the values of X and Y are positive, then we can say that the point is located in the
first quadrant.
OK, so elusive, elusive X is negative, right?
That's the second one.
If X is negative while the Y is positive, then in this case we will print that.
The point is under the second quadrant.
Right.
You agree with me.
Awesome.
So also let's say that that's still not the case.
And if we know that X is positive, but why is negative.
Right?
If X is positive by Y's negative, no.
Let's do first of all, the third one.
Both of them are negative, so if X is less than zero and wise less than zero, let's go like this.
So if both of them are negative, then in this case, let's say that it's under the third OK, the third
coordinate and finally they all save X is negative.
And also last on last condition will be the final else.
If neither of them was OK, then in this case we will simply train.
I don't know.
The point is located, I don't know at the center of.
And it will probably be zero zero.
Right.
And that's basically how we should approach this exercise.
And let's go and build and run it, see how it works.
So enter X and Y, let's go Y and one in five.
So the point one in five is located in the first quadrant.
OK, good, good, good.
Let's check the second one so we can say that it will be minus two and let's say five.
So the point minus two five is located in the second quadrant and so on and so forth.
Guys, basically let's check it out.
Also four zero zero.
OK, so the point is located in the center.
So yeah, this is it for this video.
Guys, I hope you enjoyed it and you got some experience and some practice, some hands on.
And let me know if you still have any questions regarding this this exercise, because we took something
from math and just simplified it and wrote a program in our programming language that simply simulates
and finds out which in which quadrant a given point is located.
So until next time.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.