We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Tutorials
- 30 Days of Code
- Day 7: Arrays
- Discussions
Day 7: Arrays
Day 7: Arrays
Sort by
recency
|
2046 Discussions
|
Please Login in order to post a comment
n = int(input()) arr = list(map(int, input().rstrip().split())) i = len(arr)-1 while(i>=0): print(arr[i],end=" ") i=i-1
code in pyhton 3
I wasn’t really feeling arrays today
for (int i = n - 1; i >= 0; i--) { System.out.print(arr.get(i)); if (i != 0) { System.out.print(" "); }
Python 3