Set Target to 7.
Get BobGuess.
Get CharlieGuess.
Set BobError to absolute value of Target - BobGuess.
Set CharlieError to absolute value of Target - CharlieGuess.
If BobError < CharlieError then
   Output "Bob gets a kiss from Alice!"
Else
   If CharlieError < BobError then
      Output "Charlie gets a kiss from Alice!"
   Else
      Output "Pucker up, Kate, here come your brothers."
Stop