i have this program assignment and i dont know how to approach it:
Golden Strings can be defined by the following (recursive) scheme.
G0= “a”; G1=”b”; and
Gk = Gk-1 + Gk-2; for k>=2.
Thus, G2 = G1 + G0 = “b” + “a” = “ba”,
G3 = G2 + G1 = “ba” + “b” = “bab”,
And, G4 = G3 + G2 = “bab” + “ba” = “babba”,
Write a program that will print G10.
Now i know i can do a while or a for loop...