33 lines
422 B
C
33 lines
422 B
C
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
int i;
|
|
int j;
|
|
int k;
|
|
int *arr;
|
|
|
|
k = -1;
|
|
while (++k < 5)
|
|
{
|
|
i = -1;
|
|
while (++i < 6)
|
|
{
|
|
arr = ft_range(k, i);
|
|
printf("Range from k:%d to i:%d, ptr: %p: <", k, i, arr);
|
|
j = -1;
|
|
while (++j < i - k)
|
|
{
|
|
if (j < i - k - 1)
|
|
printf("%d, ", arr[j]);
|
|
else
|
|
printf("%d", arr[j]);
|
|
}
|
|
printf(">\n");
|
|
free(arr);
|
|
}
|
|
printf("\n");
|
|
}
|
|
return (0);
|
|
}
|