My program specifications are as follows. 1. All four digits are different 2. The digit in the thousands place is three times the digit in the tens place 3. The number is odd. 4
Swap while(found) for while(!found).
while(found)
while(!found)
Just think about it logically. You don't want to look while you've found something. You want to keep looking while you've not found it.