I twice recently missed the following type of question in a test and I'm having trouble understanding How is the answer 14? Could someone explain it to me, please?
What is the value of sum after the following is executed?
sum = 0;
for ( x = 2; x < 6 ; x = x + 1 )
{
sum = sum + x;
}
