In the code fragment below, $\text{start}$ and $\text{end}$ are integer values and $\text{square(x)}$ is a function that returns $\text{Ture}$ if $\text{x}$ is a perfect square and $\text{False}$ otherwise.
i := 0;
j := 0;
k :=0;
for m in [start,start+1,...,end]
{
if(square(m)=True)
{
i := i + m*m;
k := k + m*m;
}
else
{
j := j + m*2;
k := k + m*2;
}
}
At the end of the loop, which of the following are correct statements about the relationship between $\text{i, j}$ and $\text{k}$?
- $\text{k = i$\ast$i+j$\ast$2 if (end – start)}$ is even
- $\text{k = i$\ast$i+j if (end – start)}$ is odd
- $\text{j = k-i if (end – start)}$ is even
- $\text{i = k-j if (end – start)}$ is odd