title: Comparing multiple characters in C
body: <p>I am making a <strong>stone knife paper</strong> game.(<em>Rock Paper Scissors</em>) In this assignment we have been asked to use numbers for comparison purposes. Hence the need for converting users input '<strong>S</strong>' or '<strong>K</strong>' or '<strong>P</strong>' to <strong>0 , 1 ,2</strong> repectively.I have run into trouble using the <strong>strcmp</strong> funtion which doesn't seem to work due to my limited understanding of pointers and characters.</p>
  
  <pre><code>int comp_number,user_number;
  char user_guess[1], computer_guess[1];    
  printf("Please enter S (for stone) or K (for Knife) or P (for Paper).\n");
  
      scanf("%c",&amp;user_guess);
  
      comp_number = rand() % 3;
  
      /*
       o = stone
       1 = kinfe
       2 = paper
      */
  
  
      if(strcmp(user_guess,"S")==0 || strcmp(user_guess,"s")==0){
  
          user_number=0;
  
      }else if(strcmp(user_guess,"K")==0 || strcmp(user_guess,"k")==0){
  
          user_number=1;
  
      }else{
  
          user_number=2;
      }
  </code></pre>