Create a file called loops2.c
.
Write a program that prompts the user to enter a non negative integer. If the user enters a negative value it should inform the user that the number is not negative and re prompt the user to enter a non negative integer. The program should continue to prompt the user until they enter a valid value and then the program should exit.
You can assume that the user correctly enters an integer - i.e. you don't need to check that it's actually an integer.
Modify the above program as follows. After the user enters a non negative integer, print the result of calculating the factorial of that number.
After you have completed part 2. Submit the assignment to me on Slack. If there is still time in class, and you haven't already done so, complete parts 5 and 6 from the class 16 assignment. If you complete that, modify today's assignment so that it checks that the number the user entered is also an integer (i.e. if they enter a decimal number, reprompt).