>#define PF printf

Eew, that is awful. What purpose does redefining printf serve?

>void main()

int main()

Compare this with your code, it will be more instructive than us simply telling you the problems. I have written it in C since that seems to be your choice of language even though this is posted in the C++ forum:

Code:

#include <stdio.h>
#include <stdlib.h>
void bubble_sort ( int *a, int size )
{
int i, j;
for ( i = size - 1; i >= 0; i-- ) {
for ( j = 0; j < i; j++ ) {
if ( a[j] > a[j + 1] ) {
int save = a[j];
a[j] = a[j + 1];
a[j + 1] = save;
}
}
}
}
int main ( void )
{
int *numbers;
int n;
int i, j;
printf ( "Julienne's number bubble sorter in ascending order\n" );
printf ( "How many numbers: " );
fflush ( stdout );
if ( scanf ( "%d", &n ) != 1 || n < 1 ) {
fprintf ( stderr, "Invalid input\n" );
return EXIT_FAILURE;
}
numbers = malloc ( n * sizeof *numbers );
if ( numbers == NULL ) {
fprintf ( stderr, "Memory allocation error\n" );
return EXIT_FAILURE;
}
for ( i = 0; i < n; i++ ) {
printf ( "Number %d: ", i + 1 );
fflush ( stdout );
if ( scanf ( "%d", &numbers[i] ) != 1 )
break;
}
bubble_sort ( numbers, i );
for ( j = 0; j < i; j++ )
printf ( "%d ", numbers[j] );
printf ( "\n" );
free ( numbers );
return EXIT_SUCCESS;
}