Pergunta de entrevista da empresa Hyland

void PrintFibonacci(int iteration) { int x = 0; int y = 0; for ( int loop = 0; loop < iteration; loop++ ) { int z = x + y; PrintInt( z ); x = y; y = z; } } Is the above program correct?

Resposta da entrevista

Sigiloso

16 de abr. de 2012

No, initial value of x and y should not be zero.

5