#include
#include
#include
#include
#include

int main()
{
    int diceA;
    int diceB;
    int diceC;
    int total;
    int prevTotal;
    char guess;
    char exit = 'y';

    srand(time(NULL));

    while(exit == 'y'){
        diceA = (rand()%6)+1;
        printf("Dice 1: %d\n",diceA);
        diceB = (rand()%6)+1;
        printf("Dice 2: %d\n",diceB);
        diceC = (rand()%6)+1;
        printf("Dice 3: %d\n",diceC);

        total = diceA + diceB + diceC;
        printf("Total: %d\n",total);

        prevTotal = total;


        puts("Is the next total of the 3 rolled dices going to be higher(h), lower(l) or the same(s) then now? ");
        scanf(" %c",&guess);


        diceA = (rand()%6)+1;
        printf("Dice 1: %d\n",diceA);
        diceB = (rand()%6)+1;
        printf("Dice 2: %d\n",diceB);
        diceC = (rand()%6)+1;
        printf("Dice 3: %d\n",diceC);

        total = diceA + diceB + diceC;
        printf("Total: %d\n",total);


        switch(guess){

            case 'h' :
                if(prevTotal < total){
                    puts("Nice Guess!");
                }
                else{
                    puts("You Suck!");
                }
                break;
            case 'l' :
                if(prevTotal > total){
                    puts("Nice Guess!");
                }
                else{
                    puts("You Suck");
                }
                break;
            case 's' :
                if(prevTotal == total){
                    puts("Nice Guess!");
                }
                else{
                    puts("You Suck!");
                }
                break;
        }

        printf("Do you wish to play again? (y/n)\n");
        scanf(" %c", &exit);


    }
    return 0;
}


I worked with the switch statement to make it easier to see.