if (x=0);
You clearly are not listening. If statements do not end with ;. The equality operator is ==, not =.