Skip to content

Commit 52d9a95

Browse files
[Feature #2] Cases from Holberton
1 parent 6b55d35 commit 52d9a95

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

main.c

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
#include "printf.h"
2-
1+
#include "holberton.h"
32

3+
/**
4+
* main - main function for testing
5+
* Return: 0
6+
*/
47
int main(void)
58
{
6-
char test = '0';
7-
char test2 = '1';
8-
char *str1 = "Hola ";
9-
char *str2 = " mundo ";
10-
char *str3 = " end";
11-
_printf("-> %s%c%s%c%s <-", str1, test, str2, test2, str3);
9+
int len;
10+
int len2;
11+
12+
len = _printf("Let's try to printf a simple sentence.\n");
13+
len2 = printf("Let's try to printf a simple sentence.\n");
14+
_printf("Length:[%d, %i]\n", len, len);
15+
printf("Length:[%d, %i]\n", len2, len2);
16+
_printf("Negative:[%d]\n", -762534);
17+
printf("Negative:[%d]\n", -762534);
18+
1219
return (0);
1320
}

0 commit comments

Comments
 (0)