Skip to content

Instantly share code, notes, and snippets.

@rhysforyou
Forked from anonymous/gist:2224612
Created March 28, 2012 08:04
Show Gist options
  • Select an option

  • Save rhysforyou/2224621 to your computer and use it in GitHub Desktop.

Select an option

Save rhysforyou/2224621 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main()
{
int num1, num2, num3 , num4, num5;
bool sorted = true;
do {
if num1 > num2 {
int temp= num1;
num1= num2;
num2= temp;
sorted= false;
}
// And so on for each variable
} while(sorted == false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment