title: Pascal - How do i sum all the numbers that can be divided by 4, must use repeat
body: <p>Cant obtain a correct answer it sums incorectly and multiplicates too, i must use repeat when solving this problem, i suppose the problem is in <code>sum:=i+i</code> but i dont know how to solve it</p>
  <pre><code>program SAD;
  uses crt;
  var a, i, sum, prod: integer;
  begin
  clrscr;
  sum:=0;
  prod:=0;
  {Sum}
  repeat
  for i:=1 to 26 do
  if i mod 4 = 0 then sum:=i+i;
  until i = 26;
  {Multiplication}
  repeat
  for a:=1 to 26 do
  if a mod 4 = 0 then prod:=a*a;
  until a = 26;
  writeln('Suma numerelor divizate la 4 este:', sum);
  writeln('Produsul numerelor divizate la 4 este:', prod);
  end.
  </code></pre>