Software Engineering 13 - University of Queensland
Software Engineering 14
Programming in C
Class Syllabus #4
Bubble Sort, String reading, ctype.h,strlen(),strcmp(), ? : operator,
the need for functions, #ifdef #endif
/*bubleSort.c*/
#include
#include
#include
#include
//#define DEBUG
#define MAX_NUMBERS 1000
#define MAX_BUFFER 256
int main()
{
double data[MAX_NUMBERS]; //this array is the actual data
int n=0; //this is the number of data elements
char inString[MAX_BUFFER]; //used to input numbers
int dotPos; //signifies the position of the dot in the number (###.####), -1 if no dot
double pow; //helps convert string to float
int i,j; //iterators
char numFlag=1; //signifies when to leave input loop
double temp; //for switch in buble sort
printf("ENTER REAL POSITIVE NUMBERS.\n"
"(TO STOP ENTERING THE NUMBERS ENTER A NON-DIGIT CHARACTER)\n");
while(numFlag && n ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- university of chicago engineering ranking
- types of software engineering models
- software engineering process model
- software engineering models pdf
- university of illinois engineering ranking
- software engineering job outlook
- software engineering job growth
- software engineering trends
- microsoft software engineering intern
- university of florida engineering ranking
- university of florida engineering degrees
- university of miami engineering ranking