Skip to content

Instantly share code, notes, and snippets.

@LisGein
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LisGein/ac87ea878a8ed206f6c7 to your computer and use it in GitHub Desktop.
Save LisGein/ac87ea878a8ed206f6c7 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n;
cout << "Vvedite chislo n" << endl;
cin >> n;
int *arr = new int[n];
int i = 0;
for (i = 0; i < n; i++)
{
cout << "Vvedite massiv" << endl;
cin >> arr[i];
}
sort(arr, arr + n);
for (int i = 0; i < n; ++i)
{
cout << "massiv=" << arr[i] << "" << endl;
}
delete [] arr;
system("pause");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment