Project 19

More functions & Bubble Sort(100 points)


Sample output 1

Enter number 1 or a letter to quit: 4.3
Enter number 2 or a letter to quit: 7
Enter number 3 or a letter to quit: 1
Enter number 4 or a letter to quit: 8.4
Enter number 5 or a letter to quit: 5
Enter number 6 or a letter to quit: 8.3
Enter number 7 or a letter to quit: 6
Enter number 8 or a letter to quit: q

original data = 4.3 , 7 , 1 , 8.4 , 5 , 8.3 , 6
ascending data = 1 , 4.3 , 5 , 6 , 7 , 8.3 , 8.4
descending data = 8.4 , 8.3 , 7 , 6 , 5 , 4.3 , 1
Median = 6


Sample output 2

Enter number 1 or a letter to quit: 5.6
Enter number 2 or a letter to quit: 7.2
Enter number 3 or a letter to quit: 6
Enter number 4 or a letter to quit: 4.2
Enter number 5 or a letter to quit: 9
Enter number 6 or a letter to quit: 7.1
Enter number 7 or a letter to quit: u

original data = 5.6 , 7.2 , 6 , 4.2 , 9 , 7.1
ascending data = 4.2 , 5.6 , 6 , 7.1 , 7.2 , 9
descending data = 9 , 7.2 , 7.1 , 6 , 5.6 , 4.2
Median = 6.55

Sample output 3

Enter number 1 or a letter to quit: 6.1
Enter number 2 or a letter to quit: g

original data = 6.1
ascending data = 6.1
descending data = 6.1
Median = 6.1