+ 1
Files in Ruby
I'm trying to create a simple test which *should* write numbers to a file everytime you run it, and then display those numbers in this format: 1: 3 2: 4 3: 9 If the user ran the program 3 times, then put those numbers in (in the same order), then on the third run, that would be the output. When I run it once, it gets the number and writes it correctly. However, when I run it twice, it only displays the number entered in that run. Help? https://code.sololearn.com/cA8dVkOUqmkm/?ref=app
3 Réponses
+ 3
Because you can't store data on Sololearn.
+ 1
o
0
Actually, I did't use it on SoloLearn @Sloth. I had the file and save.txt file on my own system and workstation.