Skip to content

Commit 1e114af

Browse files
committed
added fifth task
1 parent 1db8d97 commit 1e114af

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "main.h"
2+
3+
/**
4+
* _isalpha - Checks if the char is alpha.
5+
*
6+
* @c: The char to be checked.
7+
*
8+
* Return: return (1) if c is letter, (0) otherwise.
9+
*/
10+
int _isalpha(int c)
11+
{
12+
if ((c >= 97 && c <= 122) || (c >= 65 && c <= 90))
13+
{
14+
return (1);
15+
}
16+
else
17+
{
18+
return (0);
19+
}
20+
}

0x02-functions_nested_loops/main.h

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ int _putchar(char);
22
void print_alphabet(void);
33
void print_alphabet_x10(void);
44
int _islower(int);
5+
int _isalpha(int);

0 commit comments

Comments
 (0)