how do you use a void function to reverse the order of a .txt file then print it out?
I just need to see and example of a void reverse_order function
The user has to input the file name earlier in the program to select it (just more info)
Read all the data into an array while recording the number of data points read in. Then call a for loop with a starting value of the number of data points read in decreasing to 0. Within this foor loop have a counter variable going starting @ 0 and increasing by 1 for each iteration of the loop. Then inside this for loop call:
array[counter variable] = array[looping variable]
This will create a new array with all the values in reverse order. Just print this new array and you've got it.
i have a txt file of animals looks similar to this format
species name id date
species name id date
species name id date
species name id date
species name id date
species name id date...
i need to be able to make the bottom line the top and the top line the bottom