Answer:
The output of the document. write statement is
Explanation:
Initially: [tex]a = 0[/tex] and [tex]b = 1[/tex]
The iteration is repeated 5 times and the calculation is as follows:
First iteration:
[tex]c = a + b =0 + 1 = 1[/tex]:=> [tex]c = 1[/tex]
[tex]a = b[/tex]:=> [tex]a= 1[/tex]
[tex]b = c[/tex]:=>[tex]b = 1[/tex]
Second iteration:
[tex]c = a + b =1 + 1 = 2[/tex]:=> [tex]c = 2[/tex]
[tex]a = b[/tex]:=> [tex]a= 1[/tex]
[tex]b = c[/tex]:=>[tex]b = 2[/tex]
Third iteration:
[tex]c = a + b =1 + 2= 3[/tex]:=> [tex]c = 3[/tex]
[tex]a = b[/tex]:=> [tex]a= 2[/tex]
[tex]b = c[/tex]:=>[tex]b = 3[/tex]
Fourth iteration:
[tex]c = a + b =2 + 3= 5[/tex]:=> [tex]c = 5[/tex]
[tex]a = b[/tex]:=> [tex]a= 3[/tex]
[tex]b = c[/tex]:=>[tex]b = 5[/tex]
Fifth iteration:
[tex]c = a + b =3 + 5= 8[/tex]:=> [tex]c = 8[/tex]
[tex]a = b[/tex]:=> [tex]a= 5[/tex]
[tex]b = c[/tex]:=>[tex]b = 8[/tex]
End of iteration
document. write(c) prints the value of c which is 8