Creating the logic for a program that reverses an array of numbers -
i'm having little trouble homework. believe have solution problem, i'd make sure. here's question.
"create logic program prompts user ten numbers , stores them in array. pass array method reverses order of numbers. display reversed numbers in main program."
here's have far:
start declarations num numbers[10] count = 0 9 step 1 input numbers[x] endfor reversearray(numbers[x]) count = 0 9 step 1 output nums[x] endfor stop reversearray(num nums[x]) declarations num nums[10] count = 0 9 step 1 if nums[x] > nums[x + 1] swap() endif nums[x] = nums[x + 1] endfor return nums[x]
any appreciated. isn't in specific program, syntax doesn't matter much.
Comments
Post a Comment