In 28 and 29, for the given values of A and B, make a table showing the value of s, t, and
29.
To calculate:
A table with values
Given information:
The given numbers are
Calculation:
Take 0th iteration, the values are
Note that,
Iteration | 0 |
284 | |
168 | |
1 | |
0 | |
0 | |
1 | |
new
|
|
new
|
|
284 |
Take 1th iteration of the while-loop.
Iteration | 0 | 1 |
284 | 168 | |
168 | 116 | |
116 | ||
1 | ||
1 | 0 | |
0 | 1 | |
0 | 1 | |
1 | ||
new
|
1 | |
new
|
||
284 | 116 |
Take 2th iteration of the while-loop.
Iteration | 0 | 1 | 2 |
284 | 168 | 116 | |
168 | 116 | 52 | |
116 | 52 | ||
1 | 1 | ||
1 | 0 | 1 | |
0 | 1 | ||
0 | 1 | ||
1 | 2 | ||
new
|
1 | ||
new
|
2 | ||
284 | 116 | 64 |
Take 3th iteration of the while-loop.
Iteration | 0 | 1 | 2 | 3 |
284 | 168 | 116 | 52 | |
168 | 116 | 52 | 12 | |
116 | 52 | 12 | ||
1 | 1 | 2 | ||
1 | 0 | 1 | ||
0 | 1 | 2 | ||
0 | 1 | 3 | ||
1 | 2 | |||
new
|
1 | 3 | ||
new
|
2 | |||
284 | 116 | 64 |
Take 4th iteration of the while-loop