00:01
Welcome to this lesson.
00:03
In this lesson, we write an algorithm to find the largest of three given numbers.
00:09
So the first step we define four numbers.
00:16
All right.
00:16
So welcome to this lesson.
00:20
In this lesson, we write an algorithm to find the largest of three given numbers.
00:25
All right.
00:25
So the first part, we declare variables.
00:35
We declare four variables.
00:37
Right to hold the three given numbers and the final results right so for example we can have if they are integers we can have a b c and d so if we are given the numbers for example we have a as five we have b as six and we have then we would have d which would be the variable to hold the results.
01:32
Then we go to the second part where we compare the first two numbers to find the greater of the two.
01:58
So we compare the first two numbers to find the greater of the two.
02:04
All right on store the results to the last variable so for example if a is greater than b all right if a is greater than b then we'll have the deal which is equal to a all right else bring the else here so else the d would be equals to the b okay so we are comparing to see if a is greater than b then we'll store the results to the greater of the two to d all right if that's not the case then the b must be greater or equals to a so we store it to the d all right now let's go to the third step step to we compare the greater of the previous two or the first two to the last given number all right and store the results to the results holder right the results holder right the results holder is the last number so how do we know the greater of the previous two we will store that to the d.
04:19
All right...