I want to calculate the factorial of a number and have the results printed on the screen. If the number is -1 the program will exit. If the number is less than -1 the program will give an error message and ask for a new number. I've gotten everything taken care of except the whole calculate the factorial and have that result printed? Any advice? Specifics would be appreciated, not generic solutions. Here's what I got so far:
Code:#include <stdio.h> int main() { int big, num; num = 5; while (num >= 0) { printf("Enter the number.\n"); scanf("%d", &big); if (big == -1) { return 0; } if (big < -1) { printf("ERROR - You have just entered a negative number, please enter a non-negative number.\n"); num = 5; } } }