0
reading as numbers and saving as colors
i need to develop a program that writes a color to the screen and each line of another file according to the numbers read from a file. (The file name to be read must be read.txt, write the file name to be written.txt) 0: black 1: blue 2: red 3:green 4:white I think it will write 0-4 numbers in the read.txt file. 0 1 1 4 etc.... When I run the program it will save in the written.txt file as below. 0: Black 1: Blue 1: Blue 0: Black 4: White ... etc. I tried to do something, but saves only the first line in the written.txt file
1 Resposta
+ 2
Place return 0 out of the for loop.