I was given this assignment but I'm not really sure where to start. Could someone give me some ideas?
Assignment:
Part 1: Write a program that requires the user to input a non-negative number and then calculates the factorial of that number and prints the result to the screen. Use a while loop to continuously ask for a number (see example output below). If a negative number other than -1 is entered, print and error message and prompt for another input from the user. If -1 is entered, exit the program.
Part 2: Modify your program (in a different file) using switch to print a menu to the screen, asking the user whether they want to calculate the factorial of a non-negative number, or exit. If they choose to calculate the factorial and enter any negative number, print an error message and take them back to the main menu. If they choose an invalid menu option, print an error message and re-print the menu.