replace conditional statement with the while loop.
or
use for(;x>7; ) instead of if(x>7)