Im having some difficulties inputing elements into an array using sscanf. (The book Im using only has one like about sscanf). Anyway, all Im trying to do is input numbers into an array using fgets and sscanf, then print them.

I dont think Im too far off but I dont know what else to try.

Code:
static int valid( char array[], int count )
{   
	int i = 0, decCount = 0, negCount = 0;

	for( i = 0; i < count; i++)
  {
		if( array[i] == '\n' ) continue;

		if(( array[i] < '0' || array[i] > '9' ) && array[i] != '.' && array[i] != '-')
		return BOOL_TRUE;
		
		if( array[i] == '.' )
			decCount++;
		else if( array[i] == '-' )
			negCount++;

		if( decCount > 1 || negCount > 1 )
			return BOOL_FALSE;
	}
	return BOOL_TRUE;
}


int main (void)
{
	int maxnum;
	int e;
	char a[BUFSIZ];

	printf("How many numbers would you like to sort?\n");
	scanf("%d%*c", &maxnum);
	printf("\nPlease begin entering your %d numbers.\n", maxnum);
  
// GATHER DATA
	for( e = 0; e < maxnum; e++)
	{
		printf( "Enter number %d : ", e + 1 );
		fgets( a, BUFSIZ, stdin );

		while( valid( a, strlen(a) ) == BOOL_FALSE ) 
		{
			printf( "Invalid Integer.\n" );
			printf( "Please re-enter number %d: ", e + 1 );
			fgets( a, BUFSIZ, stdin );
		}

#if 0
		sscanf( a, "%d", a[e] );
#endif
	
	}

// OUTPUT
	printf("\n\n  Output");
	printf("\n ================ ");

	for (e = 0; e < maxnum; e++)
	{
		printf("\n  %c", a[e] );
	}

	return 0;
}