Relative Content

Tag Archive for cfor-loopvariable-assignmentcs50

Why does the variable j in the following code takes the input value at 15th iteration?

I was impressed with the class 3 on arrays from cs50 and I have written the following code in which I’ve written two initializations, two conditions and one incremental operator on j. It is a buggy logic which should run infinitely. But at 15th iteration the variable j is taking the value that was entered and terminating unconditionally. Any help would be appreciated.