Quiz. Checking valid invariants [004c]

Consider the following code:


  i = 0;
  j = 0;
  n = 10;
  while i < n do 
    i = i + 1;
    j = i + j

Which of the following is a loop invariant?

  1. \(i \leq n\)
  2. \(i < n\)
  3. \(j \geq n\)