#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;
int letterFill (string, string&);
int main(){
int misses = 0;
int exposed = 0;
string word;
string display [] = {"Information", "Technology", "Computing"};
srand(time(0));
int n=rand()% 10 + 1;
word=display[n];
for(int i=0; i<word.length(); i++)
word[i] = '*';
while(exposed < word.length()){
cout<<"Misses: "<<misses<<" : ";
cout<<" Enter a letter in word ";
cout<< word <<" : ";
char response;
cin>> response;
bool goodGuess = false;
bool duplicate = false;
for(int i=0; i<word.length(); i++)
if(response == word[i])
if(word[i] == word[i]){
cout<<response<<"is already i the word.\n";
duplicate = true;
break;
}else{
display[i] = word[i];
exposed ++;
goodGuess = true;
}
if (duplicate)
continue;
if (!goodGuess){
misses++;
cout<< response <<" is not in the word.\n";
}
}
cout <<" Yes, word was "<<word<<"."<<endl;
return misses;
}