-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalpha.c
33 lines (29 loc) · 1.2 KB
/
ft_isalpha.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yeparra- <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/14 22:28:04 by yeparra- #+# #+# */
/* Updated: 2023/11/27 22:57:03 by yeparra- ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalpha(int numero_recibido)
{
if (numero_recibido >= 'A' && numero_recibido <= 'Z')
return (1);
if (numero_recibido >= 'a' && numero_recibido <= 'z')
return (1);
return (0);
}
int main()
{
char c = 'A';
if (ft_isalpha (c))
printf("%c 1 \n", c);
else
printf("%c 0 \n", c);
return (0);
}