12345678910111213141516171819202122232425
#include <iostream.h> int main(void) { long temp; int i, j; long number[10]; cout<<"Please enter 10 numbers in row to see the sorted ones:" <<endl; for(i = 0; i < 10 ; i++) cin >> number[i]; for(i = 0 ; i <9 ; i++) { for (j = 0 ; j <9 ; j++) // bubble sort { if(number[j] > number[j+1]) temp = number[j]; number[j]= number[j+1]; number[j+1] = temp; } } for(j = 0 ; j < 10 ; j++) cout << number[j] << " "; return 0 ; }