title: C diceroll game
body: <p>I wanted to create a dice game but it's always saying my guess is wrong and idk why.
  I finally understand how to make the rand function actually random btw :D
  I think it's because the array isn't storing the strings correctly.</p>
  
  <pre><code>int main()
  {
  
  srand(time(NULL));
  int dice1 = 1, dice2 = 1, dice3 = 1, sum, key = 0;
  int dice4 = 1, dice5 = 1, dice6 = 1, sum2;
  char randomnumber[10];
  
  printf("Diceroll-game \n\n");
  printf("The first sum is:\n");
  
  
  dice1 = (rand()%6 + 1);
  dice2 = (rand()%6 + 1);
  dice3 = (rand()%6 + 1);
  
  sum = dice1 + dice2 + dice3;
  
  printf("%d\n", sum);
  
  printf("Will the next sum of 3 dices be higher(hi), lower (lo) or the same(sa) (hi, lo, sa)?\n");
  printf("Type hi, lo or sa\n");
  
  scanf("%c \n", &amp;randomnumber);
  
  dice4 = (rand()%6 + 1);
  dice5 = (rand()%6 + 1);
  dice6 = (rand()%6 + 1);
  
  sum2 = dice4 + dice5 + dice6;
  
  if (randomnumber == "hi" &amp;&amp; sum2 &gt; sum) {
     printf("You were right !\n\a");
  
  }else {
      if (key == 0) {
  printf("You were wrong.");
  key = 1;
  }
  }
  
  
  if (randomnumber == "lo" &amp;&amp; sum2 &lt; sum) {
     printf("You were right !\n\a");
  
  }else {
      if (key == 0) {
  printf("You were wrong.");
  key = 1;
  }
  }
  
  
  if (randomnumber == "sa" &amp;&amp; sum2 == sum) {
     printf("You were right !\n\a");
  
  }else {
      if (key == 0) {
  printf("You were wrong.");
  key = 1;
  }
  }
  
  
  
  printf("\nIt's %d", sum2);
  
  return 0;
  </code></pre>
  
  <p>Can someone help me please.
  Thank you.</p>