You create a program that displays the sum of even integers between and including two numbers entered by the user ..
ex) 2 and 7 = the sum of 12 (2+4+6)
this is
Your code would end up in an infinite loop.
Look at the for() loop. You have the condition
num1 <= (((num2 + 1)/2)*2)
to determine whether your loop terminates. However, since num1 itself is never incremented, and num1 < num2 is guaranteed, this condition will always be true - which means your for loop would never end. I would also suggest using a separate looping variable.