We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5967aa5 commit b88572dCopy full SHA for b88572d
Factorial.c
@@ -1,13 +1,15 @@
1
-include <stdio.h>
+#include <stdio.h>
2
int main()
3
{
4
int n, i;
5
unsigned long long factorial = 1;
6
+ //unsigned long long is the same as unsigned long long int.
7
+ //Its size is platform-dependent, but guaranteed by the C standard (ISO C99) to be at least 64 bits.
8
9
printf("Enter a number: ");
10
scanf("%d",&n);
11
- // SHow error if number is less than 100
12
+ // Show error if number is less than 0
13
if (n < 0)
14
printf("Error! Factorial of a negative number doesn't exist.");
15
0 commit comments