// algo assignment.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int DATA[5];
DATA[0]=0;
DATA[1]=10;
DATA[2]=80;
DATA[3]=1;
DATA[4]=5;
int a;int temp; int i,j;
for (i=0;i<5;i++)
{
temp=DATA[i]; // at starting it means that it has value zero
for (j=i+1;j<5;j++)
{
if(temp>DATA[j] )
{ temp=DATA[j];
a=DATA[j-1];
DATA[j-1]=DATA[j];
a=DATA[j];}
}
cout <<DATA[i]<<endl;
}
system("PAUSE");
the main purpose of this program is that i just want to sort the array in an order and it is not going like that