English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

#include
using namespace std;

main(){
int i,j,temp=0;

int n=5;

int a[n];
for(i=0;i cout << "enter a number :";
cin >>a[i];
}

for(i=0;i for (j=i+1;j<=n; j++) {
if (a[i]>a[j])
{temp=a[i];
a[i]=a[j];
a[j]=temp;
}

}
}

for(i=0;i cout << a[i]< }

system("pause");
return 0;
}

2006-07-05 18:27:36 · answer #1 · answered by iyiogrenci 6 · 0 0

fedest.com, questions and answers