bool stop = false;
int f1 = 1;
int f2 = 2;
int f3 = 0;
int sum = 2;
while (!stop)
{
f3 = f1 + f2;
sum += f3 % 2 == 0 ? f3 : 0; //THIS ONE
stop = f3 > 4000000 ? true : false;//AND THIS ONE.
f1 = f2;
f2 = f3;
}
What is that conditional operator? This is the first time I've seen anything like this.