title: Stuck on Paper-Scissors-Rock game
body: <p>While loop iterates two times every time, and CPU only scores point when choosing 'S' for scissors. Another question is, how do I make it toupper and where do I add that function? I have to use characters 'r','s', and 'p', instead of 1,2,3 to accept user input. Not sure how to proceed to fix this</p>
  
  <pre><code>#include &lt;stdlib.h&gt; 
  #include&lt;time.h&gt; 
  
  int main () {
  
     char player1;
     int player2;
     int userScore = 0, cpuScore = 0;
     player2 = rand ( ) % 3 + 1;
     srand ((int) time (NULL));
  
  int count = 0;
  while(count &lt;= 10) {
    printf("\nEnter p for Paper, r for rock, or S for scissor: ");
    scanf("%c", &amp;player1);
     switch(player1) {
        case 'P' :
         if(player1 == 'P' &amp;&amp; player2 == 1) {
           printf("Draw!");
           break;
         } else if(player1 == 'P' &amp;&amp; player2 == 2) {
           userScore++;
           printf("User won this one!");
           break;
         } else {
           cpuScore++;
           printf("CPU won this one!");
           break;
         }
        case 'R': 
           if(player1 == 'R' &amp;&amp; player2 == 2) {
           printf("Draw!");
           break;
         } else if(player1 == 'R' &amp;&amp; player2 == 3) {
           userScore++;
           printf("User won this one!");
           break;
         } else {
           cpuScore++;
           printf("CPU won this one!");
           break;
         }
        case 'S':
          if(player1 == 'S' &amp;&amp; player2 == 3) {
           printf("Draw!");
           break;
         } else if(player1 == 'S' &amp;&amp; player2 == 1) {
           userScore++;
           break;
           printf("User won this one!");
         } else {
           cpuScore++;
           printf("CPU won this one!");
           break;
         }
        default :
           printf("\nInvalid Input");
           break;
     }
     printf("\nUser Score: %d", userScore);
     printf("\nCPU Score: %d", cpuScore);
     count++;
  }
     if(userScore == cpuScore) {
       printf("\nDraw game!");
     } else if(userScore &gt; cpuScore) {
       printf("\nYou win!");
     } else {
       printf("\nCPU wins!");
     }
     return 0;
  } ``` 
  </code></pre>