aboutsummaryrefslogtreecommitdiff
path: root/test/010_math_permsign/permsgn_tests.c
blob: 46c7377848c0ad130c1fd9a4473dc55cc67953db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "../test.h"

int permsign(uint8_t *, int);

int main(void) {
	char str[STRLENMAX];
	uint8_t a[100];
	int n, i, p;

	fgets(str, STRLENMAX, stdin);
	n = atoi(str);

	for (i = 0; i < n; i++) {
		fgets(str, STRLENMAX, stdin);
		a[i] = atoi(str);
	}

	p = permsign(a, n);
	printf("%d\n", p);

	return 0;
}

Generated with cgit - Back to sebastiano.tronto.net