We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a26bf83 commit 00c68f5Copy full SHA for 00c68f5
0x04-more_functions_nested_loops/1-isdigit.c
@@ -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
+}
0x04-more_functions_nested_loops/main.h
@@ -1 +1,2 @@
int _isupper(int);
+int _isdigit(int);
0 commit comments