Skip to content

Commit 00c68f5

Browse files
committed
added: 1-isdigit.c
1 parent a26bf83 commit 00c68f5

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "main.h"
2+
3+
/**
4+
* _isdigit - checks for a digit (0 through 9).
5+
*
6+
* @c: char to be checked
7+
*
8+
* Return: 1 if @c is digit, 0 otherwise
9+
*/
10+
int _isdigit(int c)
11+
{
12+
if (c >= 48 && c <= 57)
13+
{
14+
return (1);
15+
}
16+
else
17+
{
18+
return (0);
19+
}
20+
}
+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
int _isupper(int);
2+
int _isdigit(int);

0 commit comments

Comments
 (0)