c# - Making an array ints and replace the order of number I write -


what try do, example if write 5 numbers 1,2,3,4,5 after should print 5,4,3,2,1

int[] numbers = new int[5];  (int = 0; < numbers.length ; i++) {     console.write("");      numbers[i] = int.parse(console.readline()); }  (int = 0; < numbers.length; i++) {  } 

if need print them in reverse order, want keep them stored inserted them, change second loop this:

for (int i=numbers.length-1; >= 0; i--){     console.writeline(numbers[i]); } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -