Use isblank to test for an empty cell and a pair of speech marks ("") to show nothing in a cell until the logical test is true.
eg
=IF(OR(ISBLANK(c5),ISBLANK(d5)),"",IF(c5=d5,1,0))
That will keep the result from showing until both the scores have been entered
Wing