diff --git a/imp_fun.cpp b/imp_fun.cpp new file mode 100644 index 000000000..e0a70eeda --- /dev/null +++ b/imp_fun.cpp @@ -0,0 +1,45 @@ +// A C++ program to demonstrate working of sort(), +// reverse() +#include +#include +#include +#include //For accumulate operation +using namespace std; + +int main() +{ + // Initializing vector with array values + int arr[] = {10, 20, 5, 23 ,42 , 15}; + int n = sizeof(arr)/sizeof(arr[0]); + vector vect(arr, arr+n); + + cout << "Vector is: "; + for (int i=0; i