All language subtitles for 20. Exercise 4 - Reading numbers from a file [Solution]

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
hu Hungarian Download
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 righty, so I hope you've given it a little bit time on your own to solve it.

Now we are going to do it together, so let's modify here in the open.

Instead of writing, we will read from this file.

Right.

So the the the the working mode should be reading from a file.

F.P. will point to this file and we will be able to read from it.

So how should we read?

What do you think?

What do you think should be specified here?

Well, basically we should iterate also over some for a loop, let's say equals to one eye is long is

less than or equal to ten and I plus plus OK, inside of these for a loop, we are going to do two things.

The first thing that we are going to do is to read the information stored there.

How are we going to do it using the F Cunniff function now we are going to specify here what is it expect

to receive a pointer or to file, which is F.P..

Vaneta expects to receive some format.

Right, similar to how the printed function works.

So let's use your percentage and percentage the.

Reading to values of an integer type and storing them inside, what are should we store them?

Let's create also variables and let's call it ain't number one and number two.

And now we are going to come here and specify store them inside the address of number one and inside

the address of number two.

So reading from these files, where is this file?

Here it is, reading values from here, storing it inside, number one, this one inside them two and

then to inside and one for inside them two and so on and so forth.

OK.

So, yeah, here we return value is ignored.

I, I don't really want to get into this right now, but basically we are just going through this information

and on every iteration, what are we expected to do to print the result to the screen?

So print have a basic print that you already know, read, let's say percentage and percentage and specify

here, I don't know, some backslash and one.

And number two, that's it, that's eight guys reading value by value from the file and printing it

to the council.

So let's see if it corresponds to what I'm saying, one, one, two, four, three, nine and so on.

And here is the file.

You can see that they are almost identical, right?

They are identical, actually.

One one.

So, yeah.

Now, you know, and you practice a little bit on your own how the F scanner function works.

Very important that you will know the syntax, that you will know what come to you for what comes after

and so on and so forth.

So, as always, thank you guys for watching, keep on practicing and let's move on.

My name is Vlad.

This is Alphatech.

Enjoy.

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