-2

I am supposed to use the built-in explode and implode functions in my code. For example, if the input is 12, 56, 34, 79, 26 the output should be reverse is 26 79 34 56 12.

and here is my code enter image description here

Pac Chan
  • 25
  • 1
  • 7

1 Answers1

0

first, assuming input as string, use

String myInput = "12, 56, 34, 79, 26";    
string[] inputs = str.Split(',');
Array.Reverse(inputs);

else if you want to derive your own method, see this great stack over flow anser here

Palm Tree
  • 54
  • 12