I have this assignment due today but i don't quite understand this question.
Write a program that outputs Fibonacci numbers. This part I understand I have this it lets you input a number and it'll create a fubonacci sequence of that length.
typedefunsignedlonglong ull;
int main() {
int N;
cout << "Enter the N : ";
cin >> N;
ull f0 = 0, f1 = 1;
ull f = f1;
cout << "The Sequence of Fibonacci Numbers : " << endl;
cout << f0 << " ";
cout << f1 << " ";
for (int i = 1; i < N; i++) {
cout << f << " ";
f0 = f1;
f1 = f;
f = f0 + f1;
}
cout << endl;
return 0;
}
WHAT I DON'T UNDERSTAND is this part of the assignment.. any of you guys able to make sense of this?
"Using a while loop and two or three integer variables, have your program output a new Fibonacci number to the screen each time the user enters a key (use getchar()!)."
@kemort
> "Using a while loop and two or three integer variables, have your program output a new Fibonacci number to the screen each time the user enters a key (use getchar()!)"