Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.
//Name: Nazmus //Program: Bubble Sort //Website: EasyProgramming.net #include <iostream> using namespace std; int main() { int numb[7]; int i, j; for(i=0;i<=6;i++) { cout << "Please enter number: "; cin >> numb[i]; } for(i=0;i<=5;i++) { for(j=i+1;j<=6;j++) { int temp; if(numb[i] > numb[j]) { temp = numb[i]; numb[i] = numb[j]; numb[j] = temp; } } } for(i=0;i<=6;i++) { cout << endl << numb[i] << endl; } cin.ignore(); cin.get(); //system("pause"); }