Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main() {
- // variable declaration
- string WORD;
- string QUESTION[2] = {"car", "r, c, a"};
- // ofstream MY_FILE;
- // MY_FILE.open("ScrabbleGame.txt");
- cout << "Hello and welcome to \"Scrabble Game!\" (enter 'exit' to close).\n";
- do {
- cout << "Form a sentence using the following characters: " << QUESTION[1] << "\n\t";
- cin >> WORD;
- if (QUESTION[0] == WORD) cout << "\tyou are correct!\n" ;
- else cout << "\tOops!, try again!\n";
- // reset QUESTION to something else
- } while(WORD != "exit");
- // MY_FILE.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment