Skip to content

Commit a26bf83

Browse files
committed
first task
1 parent 08e7c24 commit a26bf83

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "main.h"
2+
3+
/**
4+
* _isupper - checks for uppercase character.
5+
*
6+
* @c: char to be checked
7+
*
8+
* Return: 1 if @c is uppercase, 0 otherwise
9+
*/
10+
int _isupper(int c)
11+
{
12+
if (c >= 65 && c <= 90)
13+
{
14+
return (1);
15+
}
16+
else
17+
{
18+
return (0);
19+
}
20+
}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include "main.h"
2+
#include <stdio.h>
3+
4+
/**
5+
* main - check the code.
6+
*
7+
* Return: Always 0.
8+
*/
9+
int main(void)
10+
{
11+
char c;
12+
13+
c = 'A';
14+
printf("%c: %d\n", c, _isupper(c));
15+
c = 'a';
16+
printf("%c: %d\n", c, _isupper(c));
17+
return (0);
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 0x04-more_functions_nested_loops
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int _isupper(int);

0 commit comments

Comments
 (0)