Diagonal Difference

  • + 1 comment

    It's reading in a value from cin and assigning it to a previously declared variable named curInput. Each time the loop runs, it reads a variable value, assigns it to curInput, processes it accordingly, and then loops again until the loop is finished. Because the value of curInput is processed inside the loop and not needed again after processing, the value of curInput just gets overwritten at each cin >> curInput;.