#include <iostream>
using namespace std;
int main()
{
int option=1;
while(option!=0){
cout<<"How many numbers you want to enter: ";
int howMany;
cin>>howMany;
int array[howMany];
cout<<"Write those numbers: "<<endl;
for(int i=0;i<howMany;i++){
cin>>array[i];
}
cout<<endl<<endl;;
cout<<"Choose the option that you want: "<<endl;
cout<<"1) Write from first to last..... "<<endl;
cout<<"2) write from last to first..... "<<endl;
cout<<"0) Exit... "<<endl;
cin>>option;
cout<<endl;
switch(option){
case 1:{
for(int i=0;i<howMany;i++){
cout<<array[i]<<", ";
}
break;
}
case 2:{
for(int i=howMany-1;i>=0;i--){
cout<<array[i]<<", ";
}
break;
}
}
cout<<endl;
}
cout<<endl<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}