summaryrefslogtreecommitdiff
path: root/tests/lib/libc/stdio/h_makenumbers.c
blob: e5a9a38b9b2157802c866033c7f4ceb3afdeb80f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <stdlib.h>
#include <err.h>

int
main(int argc, char *argv[])
{
	size_t i = 0;
	size_t maxi;

	if (argc != 2)
		errx(EXIT_FAILURE, "missing argument");

	maxi = atoi(argv[1]);

	while (i < maxi)
		printf("%zu\n", i++);
	return EXIT_SUCCESS;
}