-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_isdigit.c
35 lines (30 loc) · 1.71 KB
/
ft_isdigit.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_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nmota-bu <nmota-bu@student.42barcel> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/12 15:05:19 by nmota-bu #+# #+# */
/* Updated: 2023/03/07 17:32:17 by nmota-bu ### ########.fr */
/* */
/* ************************************************************************** */
/* ╔════════════════════════════════════════════════════════════════════════╗ */
/* ║ https://github.com/nach131/42Barcelona ║ */
/* ╚════════════════════════════════════════════════════════════════════════╝ */
// ascii 48-0 to 57-9
#include "libft.h"
int ft_isdigit(int c)
{
if (c >= '0' && c <= '9')
return (1);
else
return (0);
}
// int main(void)
// {
// char n;
// printf("Escribe un caracter para comprobar si es digito:\n");
// scanf("%c", &n);
// printf("Resultado de '%c' es: %d\n",n,ft_isdigit(n));;
// }