Question: Here are some sample outputs Please try and complete the program in its entirety. You do not need to do the displayMyInfo() function. Program: Write




Here are some sample outputs




Please try and complete the program in its entirety. You do not need to do the displayMyInfo() function.
Program: Write a C program to prompt the user for two whole numbers with the first number smaller than the second. Present a menu of options to choose from. Prompt the user to select an option. Use the switch statement to carry out the selected option. The menu of options is: 1. Display numbers from ni to n2 2. Display odd numbers from ni to n2 3. Add up numbers from ni to n2 4. Display Fibonacci numbers up to n2 5. Add up 11 + 12 6. End the program. Required Functions: Write the functions' prototypes before main, and the code for functions after the main() function. 1) display. info) Input parameters: none Output datatype: void Task: display your full name, email, lab section and assignment-# in a box of star to the standard output. 2) display menu Input Parameter: none Output data type: void Task: display the menu of options to the screen. The menu is given above. 3) fibonacci () Input Parameter: int Output data type: void Task: Use a while loop to display the Fibonacci series from 0, 1, ... n2, inclusive. TIP: https://www.mathsisfun.comumbers/fibonacci-sequence.html Fibonacci Sequence is the series of numbers: 0,1, 1, 2, 3, 5, 8, 13, 21, 34, ... The next number is found by adding up the two numbers before it. The 2 is found by adding the two numbers before it (1+1), The 3 is found by adding the two numbers before it (1+2), and the 5 is (2+3), and so on! 4) add. inverses. O Input Parameter: two int p1, p2 Output data type: float Task: Compute 1/p1 + 1/p2 and return the sum as output. Your main() would have the tasks in the following sequence: int main() // declare variables as needed. // Prompt the user for two whole numbers such that nl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
