In Coral,write a program that reads a list of 10 integers and outputs those Integers in Reverse. For coding Simplicity, follow each output integer by a space, including the last one. Then, output a new line. Example if the input is 2 4 6 8 10 12 14 16 18 20, the output is: 20 18 16 14 12 10 8 6 4 2 to achieve above first read the integers into an array. Then output the array in reverse
integer array(10) nums
integer i
for i = 0; i < nums.size; i = i + 1
nums[i] = Get next input
for i = nums.size-1; i >=0 ; i = i - 1
Put nums[i] to output
Put " " to output
Get Answers For Free
Most questions answered within 1 hours.