mirror of https://github.com/TheAlgorithms/C
fix argc check
refer: dd40af2736 (r40309582)
(cherry picked from commit 610181d5e81c39cb23415cf056a021acc37f9b3c)
This commit is contained in:
parent
e75dfb8646
commit
2a0b8917f8
|
@ -129,7 +129,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
if (argc == 2)
|
if (argc == 2)
|
||||||
N = strtoll(argv[1], NULL, 10);
|
N = strtoll(argv[1], NULL, 10);
|
||||||
else if (N > 2)
|
else if (argc > 2)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Wrong number of input arguments!\n");
|
fprintf(stderr, "Wrong number of input arguments!\n");
|
||||||
printf("Usage:\t ./sol1.c [N=1000]");
|
printf("Usage:\t ./sol1.c [N=1000]");
|
||||||
|
|
Loading…
Reference in New Issue