implement a function that prints an array of numbers going backwards and forwards

implement a function that prints an array of numbers going backwards

and forwards. You ask the user to input a sequence of numbers and the program will output the numbers going forwards and backwards.
E.g you are given 1 2 3 4 5 and the function prints 1 2 3 4 5 5 4 3 2 1.
thanks!

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"