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
In your for loop it should be like this.
double sum = 0.0; for(i = num1; i <= num2; i++){ if(i % 2 == 0){ // Is our number even sum += i; } }
That's it and it print out sum.