Problem number eight, we have to calculate the sum of three numbers, and you've just given two examples.
Oh, actually, you have three numbers from the terminal calculate there are some numbers there with
the line OK, and then we have three more numbers.
All right.
So we just have to do the same thing twice.
So let's go ahead.
Let's read from numbers, actually.
This should probably be ordered before them and you create the problem, however.
Well, yeah, if you've already read them and you know, I think that this problem, if you've already
completed them and you created this should be a kind of like a walk in the park.
So let's go ahead and do that.
But as we create our reader or fail document, we do it all as well as to the end.
OK.
And then we first read our string, so we are right and then our you.
It's in the strength and we specify a new line.
OK.
Then we check whether we have something wrong, and I think if we do and yeah, we have to turn this
line now into an integer, so we have number one error being equal to the assertion vetoed a toy which
converts a string to an integer with an error which is optional to it that you specify the line, but
you first have to frame this basis from it in order to avoid having the new line in there.
And again, we checked.
All right.
And let's just print it out for now.
Verify everything works property.
So I run this program and I get.
Well, actually, it blocks because it waits for input.
All right, five and against five principle as a result sorts, it seems like this works correctly.
Now I have to do the same thing for all the other numbers.
First, I don't use the shorthand anymore because both light and number are initialized and I we then
have number two afterwards, we have number three.
OK, so we've Krentz number one number two in Berkeley.
Let's run this 5.3 and we read the numbers successfully.
So all we have to do now is Sprint.
There are some.
OK, so we'll just write results.
And then we calculate no one listening to those on three.
That's from those five or 5.3, be it 12.
And that is correct.
All right, now we go through this again.
Well, now we're going to get the 15 years, but again, another challenge learn about the functions
and avoid doing this.
But if you don't know how to do it, you have to, well, just copy it every time.
OK.
So I run this five four three one two three.
Oh!
Something was wrong here.
Why did I get?
Oh yeah, I didn't read the first line.
So there you go.
OK, let's try again.
One, two three.
We got six five six seven.
You get 18 if and when there's a lot of the line.
So this is a bit wrong anyways.
Now it's perfect.
OK.
That concludes problem number eight.