int
main(int argc, char **argv) {
    int n, x, y;

    printf("three numbers : ");
    scanf("%d %d %d", &n, &x, &y);
    printf("n = %p\n", &n);
    int_sort3(&n, &x, &y);

    printf("n=%d, x=%d, y=%d\n", n, x, y);
    printf("n = %p\n", &n);
    return 0;
}
Exemplo n.º 2
0
int 
main(int argc, char *argv[]) {
	int x, y, z;

	printf("Enter three integers:");
	if (scanf("%d %d %d", &x, &y, &z) != 3) {
		printf("Invalid input.\n");
		exit(EXIT_FAILURE);
	}

	int_sort3(&x, &y, &z);

	assert(x <= y && y <= z);

	return 0;
}