#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
   int dice[3];
   int dice2=0;
   srand(time(0));
   char choice[0];



   printf("The dice has been rolled three times.\n\n");
   for(int i = 0;i<1;i++)
   {
       dice = (1+rand() % 6);
       dice[i+1] = (1+rand() % 6);
       dice[i+2] = (1+rand() % 6);
       printf("Dice roll one is: %d\n",dice);
       printf("Dice roll two is: %d\n",dice[i+1]);
       printf("Dice roll three is: %d\n",dice[i+2]);
   }
    printf("\n");

    printf("Do you think the next roll will be Higher, lower or the same?\n\n");
    printf("Enter h for higher.\n");
    printf("Enter l for lower.\n");
    printf("Enter s for same.\n");

    printf("\n");


    printf("I think dice roll four will be: ");
    scanf("%s",choice);


    printf("\n");

    dice2 = (1+rand()%6);
    printf("Dice roll four is %d\n",dice2);

    for(int i =0;i<1;i++)
    {
        if(choice[0]=='h' && dice2>dice[i+2])
        {
            printf("Yup the next roll is higher!! Good job.\n");

        }

        else if (choice[0]=='l' && dice2<dice[i+2])
        {
            printf("Yup the next roll is lower!! Good job.\n");

        }

        else if(choice[0]=='s' && dice2==dice[i+2])
        {
            printf("Yup the next roll is the same!! Good job.\n");
        }
        else
        {
            printf("Sorry,try again!!\n");
        }
    }


    return 0;
}