In the code below i have to remove all loop variant computations, my friend has given me this problem and I am not able to solve it for a long time.
x = 10
a = 20
for(i = 0;i<10;i++){
b = a * i;
c = x * a;
d = b + c;
y = c * 10;
}
I have to remove all the loop variants
New contributor
uma shanker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.