-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathft_isdigit.c
31 lines (28 loc) · 1.14 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jede-ara <jede-ara@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/02 14:50:24 by jede-ara #+# #+# */
/* Updated: 2022/11/08 14:27:02 by jede-ara ### ########.fr */
/* */
/* ************************************************************************** */
/*
DESCRIÇÃO: isdigit() verifica se o caractere é dígito decimal.
*/
#include "libft.h"
int ft_isdigit(int c)
{
if (c >= '0' && c <= '9')
return (1);
return (0);
}
/*#include <stdio.h>
int main()
{
char c = 'a';
int b = 5;
printf("%d\n",ft_isdigit('5'));
}*/