Skip to content

Commit b88572d

Browse files
Update Factorial.c
1 parent 5967aa5 commit b88572d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Factorial.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
include <stdio.h>
1+
#include <stdio.h>
22
int main()
33
{
44
int n, i;
55
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.
68

79
printf("Enter a number: ");
810
scanf("%d",&n);
911

10-
// SHow error if number is less than 100
12+
// Show error if number is less than 0
1113
if (n < 0)
1214
printf("Error! Factorial of a negative number doesn't exist.");
1315

0 commit comments

Comments
 (0)