/* Course Number : ISYS 116 Student Name : Jason Gradziel Student Number : 826-135-535 Professors Name : Gene Rychlewski Class Name : Thursday Lab Title : Bubble Sort Demo program */ #include #include #include /* Global Variables */ #define NUM_QUIZZES 10 /* Function Prototypes */ /* Mainline functions */ //int setup(); //int process(); //int wrapup(); /* Subroutine functions */ /* Mainline */ void main(void) { clrscr(); int grade[NUM_QUIZZES] = {50,10,100,40,90,60,20,70,30,80}; int quiz, temp, pass, limit; /* get the grades */ printf("\nPlease enter %d integer quiz grades.\n\n", NUM_QUIZZES); for (quiz=0; quiz grade[quiz+1]) { temp=grade[quiz]; grade[quiz] = grade[quiz+1]; grade[quiz+1]=temp; } --limit; } /* display the sorted quiz grades */ printf("\n\nThe grades in increasing order are as follows:\n"); for (quiz=0; quiz=0; --quiz) { printf("%6d",grade[quiz]); } printf("\n"); /* clean up */ fflush(stdin); getch(); clrscr(); } /* Subroutines */ /*int setup() { return 0; } int process() { return 0; } int wrapup() { */ /* clean up */ /* fflush(stdin); getch(); clrscr(); return 0; } */ /* Lower level subroutines */