in reply to Remove a Line

Simply delete lines 25 to 29 and the message with the total number of cars will no longer be printed.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Replies are listed 'Best First'.
Re^2: Remove a Line
by PilotinControl (Pilgrim) on Mar 31, 2013 at 22:00 UTC

    No that just keeps the output from going to the terminal screen...the file still reads that line: There are Car(s)

      Now you have me totally confused.

      What do you mean by "the file still reads that line". Which file reads which line?

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics
      What file?

        The Data file here is the output to the file and the screen:
        There are 16 Car(s); <---- This line needs to be removed
        There are 4 Hopper Car(s) <---- This is the output
        Which is false there are Not 16 cars there are only 4 cars.