0 Reputation Points
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
2 Posted Topics
I just changed small thing in your code.Factorial values of 1 and 0 is 1.I have done it in the following program.You check it. [code] #include <stdio.h> #include <stdlib.h> int main() { int x, number, fac; fac = 1; printf("Enter a number:\n"); scanf("%d",&number); if(number<0) { printf("Factorial not defined for negative …
[QUOTE=cableguy414;1114375]I'm writing a shell script that can take zero to 2 user arguments. I have an if statement to check to see if any arguments were entered and then I have a case to enter the arguments into the correct variables. This all works great. Now, I want to add …
The End.
nvivek