help me pls.. how to make C++ syntax that asking the user to perform 5 intigers and asking "what do you wish to do with an array" a.Reverse array b.Transfer array c.End Program a 5 numbers 12345 54321 what do you wish to do with an array a.Reverse array b.Transfer array c.End Program c Goodbye. thank you! press any key to continue.... help pls... ^_^
using arrays and loop..
@ganeshie8 pls help
@whpalmer4
@wolfe8
I'm sorry can you explain specifically what you want to do?
cout << "Enter 5 blah blah ablha"; int foo[5]; for(int i=0;i<;i++) cin >>foo[i]; //array reversal int bar[5]; for(int i=5;i>0;i--) { bar[i]=foo[5-i]; } for(int i=0;i<5;i++) { foo[i] = bar[i] } /*or this std::reverse(std::begin(foo), std::end(foo)); */
Join our real-time social learning platform and learn together with your friends!