#include<iostream> using namespace std; int main () { int n[6]={5,4,5,3,5,10 }; int counter; for(int i=0; i<5; i++) { for(int j = i+1; j<6; j++) { if(n[i+1]<n[i]) { int temp = n[i]; n[i] = n[i+1]; n[i+1]= temp; cout<<n[i]; } } } system("pause"); }
cout
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)