Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
UsingAlgorithm
//g++ 7.4.0 //using algorithm #include <iostream> #include <algorithm> #include <vector> #include <ctime> using namespace std; const int len=10; vector<int> list; void get_list(){ for (unsigned int i=0;i<list.size();i++){ cout<<list[i]<<","; } cout<<endl; } int main() { for (int i=0;i<len;i++){ list.push_back(rand()%10); } cout << "Using Algorithm !!! \n[ * Random List]:"; get_list(); cout << "[ * Sorted List]:"; sort(list.begin(),list.end()); get_list(); }
run
|
edit
|
history
|
help
0
iuadhfaoiufs
queue-with-fixed-size
RegExpress
Default copy
Nieparzyste w macierzy
no_error
matrix calculator
RandomMessage
MyStringv2
BinTree playground