Your program should go into an infinite loop by running fibonacci number function and generate the

Your program should go into an infinite loop by running Fibonacci number function and
generate the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13…). If an overflow occurs, the
sequence will start all over again from 0.
2) During generating the Fibonacci sequence, you should check to see if a character has been
received in from input. Your program should contain an interrupt service routine such that
while generating the sequence, the user is able to optionally enter or not enter a character.
Depending upon the character input, your program should do the following:
• On receipt of a “p” or “P” your program should print out to the console the current
Fibonacci sequence and reset the sequence generation.
• On receipt of an “r” or “R” your program should print out the current Fibonacci sequence
in the reversed order and reset the sequence generation.
• On receipt of a “q” or “Q” your program should terminate gracefully, meaning from the
main procedure after correctly returning from all currently invoked procedures.
• Your program should ignore any other input from the keyboard.
3) Your program should use subroutines to implement the in order printing and the reverse
printing respectively
nits
Asked Nov 02, 2014

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.

Categories