You are on page 1of 1

#include<iostream>

using namespace std;

int main()
{
float arr[10], store=0;
int i=0, j=0;

cout<<"Enter 10 numbers: ";

for (i=0;i<=9;i++)
{
cin>>arr[i];

for (i=0;i<=9;i++)
{
for (int j=0;j<=9;j++)
{
if (arr[i]<arr[j])
{
store=arr[i];
arr[i]=arr[j];
arr[j]=store;
}
}
}
cout<<"----------------------------------------"<<endl;
cout<<"The inputted numbers in accsending are: "<<endl;
for (int i=0; i<=9; i++)
{
cout<<" "<<arr[i];
cout<<endl;

}
cout<<"----------------------------------------"<<endl;
system("pause");
return 0;
}

You might also like