My version of challenge 2 the dice game

#include
#include
#include
#include
#include
#include

/*
dice game:
user guess is the dice
gonna go higher or lower
*/
int main()
{
    int x = 0;
    int diceA;
    int diceB;
    int diceC;
    int firstDiceTotal;
    int diceTotal;
    char answer;


    do{
        srand(time(NULL));
        diceA = (rand()%6) + 1;
        diceB = (rand()%6) + 1;
        diceC = (rand()%6) + 1;
        diceTotal = diceA + diceB + diceC;
        if (x != 0){
            printf("The total of dice is : %d \n", diceTotal);
            if (answer == 'h'){
                if(diceTotal > firstDiceTotal){
                    printf("Good Job");
                }else{
                    printf("To bad You Wrong");
                }
            }else{
                if(diceTotal < firstDiceTotal){
                    printf("Good Job");
                }else{
                    printf("To bad You Wrong");
                }
            }
        }else {
            printf("The totals of dice is : %d \n", diceTotal);
            printf("Guess what come next  : ");
            scanf(" %c", &answer);
        }
        firstDiceTotal = diceTotal;
        x++;
    }while(x < 2);

    return 0;
}