title: Pascal, 3 rows, only reads the first one, how to make it read the other 2?
body: <pre><code>program tekstinis;
  var
    txt: Text;
    i, n: Integer;
    a, b, c: Integer;
  
  function did: Integer;
  begin
    if (a &gt;= b) and (a &gt;= c) then
      Writeln('Didziausias skaicius :', a)
    else
    if (b &gt;= a) and (b &gt;= c) then
      Writeln('Didziausias skaicius :', b)
    else
    if (c &gt;= a)  and (c &gt;= b) then
      Writeln('Didziausias skaicius:', c);
  end;
  
  begin
    Assign(txt, 'D:\Desktop\tekstine_rinkmena.txt');
    Reset(txt);
    Read(txt, a, b, c);
    if (a &gt;= b) and (a &gt;= c) then
      Writeln ('Didziausias skaicius :', a)
    else
    if (b &gt;= a) and (b &gt;= c) then
      Writeln('Didziausias skaicius :', b)
    else
    if (c &gt;= a)  and (c &gt;= b) then
      Writeln ('Didziausias skaicius:', c);
    ReadLn;
    Close(txt);
  end.
  </code></pre>
  
  <p>This program's input is a text file with 3 rows containing 3 numbers. It reads the first row and shows the biggest number, but I don't know how to force it to read the other two rows.</p>
  
  <p>EDIT:  forgot to mention that there are 3 rows with 3 numbers 
  5 7 4, 
  9 9 8,
  8 7 8, 
  I want the program to use every row in the if function. So then it could write the biggest number of each row ( so far i succeeded with the first row)</p>