Skip to content

Commit 11690fd

Browse files
Update: added code for 102-print_comb5.c
1 parent 61b1fd7 commit 11690fd

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#include <stdio.h>
2+
3+
/**
4+
* main - entry point
5+
*
6+
* Return: always returns 0
7+
*
8+
*/
9+
10+
int main(void)
11+
{
12+
int i;
13+
int j;
14+
15+
for (i = 0; i <= 99; i++)
16+
{
17+
for (j = i + 1; j <= 99; j++)
18+
{
19+
putchar(i / 10 + '0');
20+
putchar(i % 10 + '0');
21+
putchar(' ');
22+
putchar(j / 10 + '0');
23+
putchar(j % 10 + '0');
24+
25+
if (!(i == 98 && j == 99))
26+
{
27+
putchar(',');
28+
putchar(' ');
29+
}
30+
}
31+
}
32+
putchar('\n');
33+
return (0);
34+
}

0 commit comments

Comments
 (0)