assignment2.c
//Option 3: Sort the contents of the array in increasing order

Option 3: Sort the contents of the array in increasing order
Option 3 : Sort the contents of the array in increasing order
void sort_array(int *temp_array3)
{
	int i = 0;
	int j = 0;
	int a = 0;
	for (i = 0; i < NUMUSER; ++i)
    {
        for (j = i + 1; j < NUMUSER; ++j)
        {
            if (*(temp_array3+i) > *(temp_array3+j))
            {
                a =  *(temp_array3+i);
                *(temp_array3+i) = *(temp_array3+j);
                *(temp_array3+j) = a;
            }
        }
    }
    printf("The numbers arranged in increasing order are given below\n");
    for (i = 0; i<NUMUSER; i++)
    {
    	printf("%d, ",*(temp_array3+i));
	}
}
void sort_array ( int * temp_array3 ) { int i = 0 ; int j = 0 ; int a = 0 ; for ( i = 0 ; i < NUMUSER ; ++ i ) { for ( j = i + 1 ; j < NUMUSER ; ++ j ) { if ( * ( temp_array3 + i ) > * ( temp_array3 + j ) ) { a = * ( temp_array3 + i ) ; * ( temp_array3 + i ) = * ( temp_array3 + j ) ; * ( temp_array3 + j ) = a ; } } } printf ( " \n " ) ; for ( i = 0 ; i < NUMUSER ; i ++ ) { printf ( " " , * ( temp_array3 + i ) ) ; } }
Option 3: Sort the contents of the array in increasing order
Option 3 : Sort the contents of the array in increasing order
//Bubble sort algorithm to sort the lotto numbers in increasing order
 //Find the smallest number
 //Store smallest number
 //Swap smallest number with current number
 //Swap number back to array 
 //Re-display the lotto numbers in order
