Balraj Parab · May 23, 2015 Hi friends,                 I am just a beginner and this is what I have done in my way. If anybody knows any shortcut technique to this problem please share.                  Thank You,       *****  Solution*****#include #include #include int main(){             int g,h,j=0;           for(g=1;g<=3;g++){           h= (rand()%6)+1;           printf("\n  Dice roll no. %d = %d\n",g,h);           j = (j+h)-5;           }           printf("\n  Total = %d\n\n",j);           char reply;           printf("  Is the next no greater/lesser/equal to the total(enter 'h' / 'l' /'s')?  ");           scanf(" %c",&reply);           for(g=1;g<=4;g++){           h= (rand()%6)+1;           }           printf("\n  The next no is %d\n",h);           switch(reply){                  case 'h': if(h>j){                            printf("\nFantastic!! you guessed correct");                  }         else                            printf("\nbetter luck next time");                            break;                  case 'l': if(h

## Replies

Nothing to see here.

## C

130,983 followers

One of the most popular languages of all time.