#include <stdio.h>
#include <stdlib.h>

int get_array(double **array)
{
	int nums_elements, counter;

	do
	{
		printf("Quanti elementi deve contenere l'insieme? ");
		scanf("%d", &nums_elements);
	} while (nums_elements <= 0);

	*array = (double *)calloc(nums_elements, sizeof (double));

	for (counter = 0; counter < nums_elements; ++counter)
	{
			printf("Inserire valore %d-->", counter+1);
			scanf("%lf", &((*array)[counter]));
	}
	return (nums_elements);
}

void print(double array[], int count)
{
	printf("\n\n");
	for(int i=0; i<count; i++)
		printf("%lf | ", array[i]);
	printf("\n");
}

int main(void) 
{
	int count;
	double *insieme_A;
	count = get_array(&insieme_A);
	print(insieme_A, count);
	return 0;
}