is this some sort of one time guessing only game??

As it seems : 

1: You ask the user to enter number.
2:Validate it 
   if 0 exit 
  else if !(number <= 100 & number >= 1) Invalid number.Please enter number within range.GOTO step 1.
  else step 3.
3: generate new number and check if it matches the current process.If match HURRAY!! else GOTO step1.