#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main()
{
    int dice;
    int a=0;
    int a1=0;
    char guess;
    int i;
    int enter;

    printf("WELCOME TO THE DICE ROLL GAME BY SHARATH MADROX\nPRESS 0 TO CONTINUE\n");
    scanf(" %d", &enter);

    if(enter==0)
    {
    srand(time(0));
    for(i=0;i< 3;i++)
    {
        dice= ( rand()%6)+1;
        a=a+dice;
    }


    printf("\nDice Rolling... \nThe sum is %d \n", a);
    printf("\nEnter your guess,\npress U for upper value or L for lower value\n");
    scanf(" %c", &guess);

    for(i=0;i< 3;i++)
    {
        dice= ( rand()%6)+1;
        a1=a1+dice;
    }

    printf("The sum is %d\n", a1);

    if(a1<a)
    {

        if(guess=='L')  printf("yeah buddy you won\n");

        else            printf("you suck at this game\n");
    }
    else if(a1>a)
    {
        if(guess=='U')  printf("yeah buddy you won\n");

        else            printf("you suck at this game\n");
    }

    }
    else
    return 0;
}