All language subtitles for 6. Input to Element in a 2D Array

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

In this video, we are going to proceed with the operations on two dimensional arrays, so suppose that

you have declared a two dimensional array like this and Matt and two rows, three columns, and instead

of initializing it with some arbitrary values that you've decided, you want to feel this table with

values received from the user.

You simply want to get all the two dimensional array values as inputs from the user.

So how would you do it?

The first step in doing so is understanding the fact that we are going to use our famous SCANA function.

That's the first step.

The next steps are very easy and very similar to the way we did it with one dimensional arrays, with

one dimensional arrays to put an input from the user to a specific element in this array.

We just specified the address of the desired element in this area.

Right.

So the same goes here with the two dimensional arrays.

Basically, since we know that our two dimensional array or as we sometimes refer to it as a grid of

rows and columns, it's just a bunch of sequence, the elements sitting somewhere in the memory.

So to feel a specific element with a value received from the user, we just need to specify the address

of these desired element where we want to store the input.

So if, for example, we want to store it inside of the first element, which is it row zero and column

zero, you just specify the element itself and then you use this kind of function, add the ampersand

and read the value to a given location.

So nothing complicated.

Geisen for example, here we received seven from the user and basically also if we wanted to get all

the elements for a given two dimensional array, then in this case what we have to do is to do some

sort of iteration into iterate over all the rows and all the columns at each row, and very similar

to the example that we've seen how we can print all the values here.

We can read OK from the user, every one of these values by using this kind of function.

And just a quick side note to remind you guys why we're using the percentage D here, OK?

And that's because we defined an array of integers.

But that's definitely should be clear by now.

OK, so the percentage these because we we are using in a an array of integers and if we were using

an array of loads, let's say it will be percentage F and so on.

You got the idea.

I shouldn't remind me so much.

But still for those of you who forgot how it can be used and how it should work.

OK, so you filled your array pretty simple by using this loop.

Iterate over all the elements of the array and you are reading the input from the user.

Pretty awesome.

So we talked about the percentage, the and what else remains for us to do is basically if you just

the second example, if you would have defined an array of doubles, then you simply would have used

this kind of percentage alef.

But that's nothing complicated.

And I think you already know this much at this point.

So what I suggest you guys do right now is to give it a try on your own, stub this video and write

this simple program that gets input from the user and insert these inputs inside of these two dimensional

array that you've just created.

Also, once you are done with that, make some task, then print the values, just like we've done it

in one of our previous exercises and make sure that the input values that you've used correspond to

the values that you can see printed on the screen.

So basically that there is a correlation between the values you've inserted using your keyboard and

the values that you can see printed on the screens.

And yeah, this is it for these video guys.

I don't have anything else to add here.

A quick video where we discussed something very, very simple is just how to read inputs from the user

and store them inside a given element in our two dimensional arrays.

So thank you and a.

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.