2 Code formatting
source | link
 if(key != '%' && key != '@'){
  count++;
}
else if(count == 1){
  spot1 = key;
}
else if(count == 2){
  spot2 = key;
}

} else if(count == 1){ spot1 = key; } else if(count == 2){ spot2 = key;

You've got a problem here. If key isn't '%' and isn't '@' then you increase count but since all the rest are else if to that then it skips over all of them and never actually puts the digit int the spot.

 if(key != '%' && key != '@'){
count++;

} else if(count == 1){ spot1 = key; } else if(count == 2){ spot2 = key;

You've got a problem here. If key isn't '%' and isn't '@' then you increase count but since all the rest are else if to that then it skips over all of them and never actually puts the digit int the spot.

if(key != '%' && key != '@'){
  count++;
}
else if(count == 1){
  spot1 = key;
}
else if(count == 2){
  spot2 = key;
}

You've got a problem here. If key isn't '%' and isn't '@' then you increase count but since all the rest are else if to that then it skips over all of them and never actually puts the digit int the spot.

1
source | link

 if(key != '%' && key != '@'){
count++;

} else if(count == 1){ spot1 = key; } else if(count == 2){ spot2 = key;

You've got a problem here. If key isn't '%' and isn't '@' then you increase count but since all the rest are else if to that then it skips over all of them and never actually puts the digit int the spot.