-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckers.c
46 lines (42 loc) · 1.34 KB
/
checkers.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* checkers.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vsimeono <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/16 20:29:25 by vsimeono #+# #+# */
/* Updated: 2022/05/25 15:16:09 by vsimeono ### ########.fr */
/* */
/* ************************************************************************** */
#include "philosophers.h"
int is_number_of_args(int argc)
{
if (argc < 5 || argc > 6)
{
printf("Invalid Number of Arguments\n, Please Try Again!\n");
return (0);
}
return (1);
}
int ft_isdigit(int argc, char **argv)
{
int i;
int j;
i = 1;
while (i < argc)
{
j = 0;
while (argv[i][j])
{
if (!(argv[i][j] >= 48 && argv[i][j] <= 57))
{
printf("Please Pass Positive Integers as Arguments");
return (0);
}
j++;
}
i++;
}
return (1);
}