-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isascii.c
35 lines (31 loc) · 1.12 KB
/
ft_isascii.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yeparra- <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/16 18:32:05 by yeparra- #+# #+# */
/* Updated: 2023/11/27 23:07:08 by yeparra- ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isascii(int ascii)
{
if (ascii >= 0 && ascii <= 127)
return (1);
return (0);
}
int main()
{
int ascii = 42;
if (ft_isascii(ascii))
{
printf("%d 1 \n", ascii);
}
else
{
printf("%d 0 \n", ascii);
}
return (0);
}