Bubble sort

2011-10: Intermediate
Create a program (text or graphics) that allows the user to enter 10 numbers.
The program will then display these numbers in numerical (ascending) order.
Modify your program to allow the user to enter 10 words which are then sorted into alphabetical order.
To help with this you may want to research sorting algorithms such as the Bubble Sort.
Here is a nice video to get you in the mood!

Realizza un programma (con interfaccia di testo o grafica) che permette all’utente di inserire 10 numeri.
Il programma visualizzerà i numeri in ordine crescente.
Modifica il programma per permettere all’utente di inserire 10 parole che saranno ordinate in ordine alfabetico.

Soluzione

Ordina 10 numeri.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *