Computer Science Canada Printing to a file problem ... embarssing |
Author: | Kuntzy [ Mon Feb 02, 2004 10:23 pm ] |
Post subject: | Printing to a file problem ... embarssing |
just look at this code, and when you open up the text file, all of the lines are running continueously after one another? what have i forgotten? |
Author: | Kuntzy [ Mon Feb 02, 2004 10:24 pm ] |
Post subject: | |
don;t post anything about how stupid i am, i feel stupd enough for even asking this |
Author: | Paul [ Mon Feb 02, 2004 10:27 pm ] |
Post subject: | |
What do you mean? It looks fine to me if your trying to find prime numbers from 2 to 150, though you don't show the prime number factors. |
Author: | santabruzer [ Mon Feb 02, 2004 10:38 pm ] | ||||
Post subject: | |||||
well .. you just gotta do this or something of the sort :
As you can see..
is added, and the chr (10) basically is the "enter" in the txt file... |
Author: | Kuntzy [ Tue Feb 03, 2004 8:34 pm ] |
Post subject: | |
yeah, thanx for the help, the code was fine except for writing to the file, i couldn't get the line to skip down on the text file. |
Author: | Mazer [ Wed Feb 04, 2004 2:32 pm ] | ||||
Post subject: | |||||
Hey Kuntzy, just replace the
after your for loop with
Or, if you want the output on the screen to be properly formatted, then add the previous line instead of using it to replace that first one. |