#include <iostream>#include <string>#include <cstdlib>#include <ctime>#define a cin.get();using namespace std;int main(){enum fields{W,H,NF};const int NW=10;const string w[NW][NF]={{"wall","Do you feel you're banging your head against something?"},{"glasses","Wank too much, and you may need a pair."},{"drugs","They enhance the lols"},{"persistant","Keep at it."},{"jumble","Its what the game is all about."},{"laptop","Portable computery goodness"},{"banana","The phallus like fruit"},{"gonorrhea","The STD that makes the world go around"},{"fear","JC is a haxor on it"},{"god","Smoko is the one and only"}};cout<<"\t\t\tWelcome to Word Jumble!\n\nUnscramble the letters to make a word.\nEnter 'hint' for a hint.\nEnter 'quit' to quit the game.\n\n";int p=1;int t=1;int s=0;while(p){srand(time(0));int c=(rand()%NW);string tW=w[c][W];string tH=w[c][H];string j=tW;int l=j.size();for(int i=0;i<l;i++){int i1=(rand()%l);int i2=(rand()%l);char t=j[i1];j[i1]=j[i2];j[i2]=t;}cout<<"The jumble is: "<<j;string g;cout<<"\n\nYour guess: ";cin>>g;while((g!=tW)&&(g!="quit")){if(g=="hint"){cout<<tH;s--;}else{cout<<"Sorry, that's not it.";t++;}cout<<"\n\nYour guess: ";cin>>g;}if(g==tW){cout<<"\nYou guessed it!\n";cout<<"It took you "<<t<<" to guess the word.\n\n";s++;t=1;}if(g=="quit"){cout<<"\n\nYour score for this round was "<<s<<"!\n";cout<<"Press any key to quit...";p=0;}}a;a;return 0;}