title: I don't know how to make a random number of 0,1,2 appear as rock, paper, and sissors when printing the result sentence
body: <p>I just started learning programming, so I'm not good enough.
  I'd appreciate it if someone could help me:)</p>
  <p><strong>Question : Two random values should be made to play a total 10 times of rock-scissors-paper games and produce the following results.</strong></p>
  <h2>Here is example result.</h2>
  <p>The 1 th game was won by the computer
  (computer = sissors, player = paper)</p>
  <p>The 2 th game was won by the player
  (computer = paper, player = sissors)</p>
  <p>The 3 th game was a draw
  (computer = sissors, player = sissors)</p>
  <p>......</p>
  <p>The 10 th game ~</p>
  <h2>This is the code I write</h2>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  
  int main(void) 
  {
   // 0=rock, 1=paper, 2=sissors
   // c = computer , p = player
   
   srand(time(NULL));
   for(int i=0; i&lt;10; i++)
   {
   int c; 
   int p;
  
   c = rand() % 3;
   p = rand() % 3;
   
   sprintf (rock, &quot;%d&quot;, 0);
   sprintf (paper, &quot;%d&quot;, 1);
   sprintf (sissors, &quot;%d&quot;, 2);
  
  
   if (c == p)
   {
       printf(&quot;The %d th game was a draw \n&quot;, i+1);
       printf(&quot;      (computer = %s, player = %s)&quot;,c,p);
   }
   
   else if ((c == 0 &amp;&amp; p == 2) || (c == 1 &amp;&amp; p == 0) || (c == 2) &amp;&amp; (p == 1));
       {
           printf(&quot;The %d th game was won by the computer. \n&quot;, i+1);
           printf(&quot;      (computer = %s, player = %s\n)&quot;,c,p);
       }
      
   else
      {
       printf(&quot;The %d th game was won by the player \n&quot;, i+1);
       printf(&quot;      (computer = %s, player = %s\n)&quot;,c,p);
      }
   }
   return 0;
  }
  </code></pre>