PDA

Visualizza la versione completa : problem basically software in c++


fenigo69
23-03-2015, 07:09
hi guys, i have tryed to do this basically program in c++,in this program you have find a hidden word,you can do the solution o you can try to find the word letter after letter,but it doesn't work,can you help me?
‪#‎include‬ (https://www.facebook.com/hashtag/include?source=feed_text) <iostream>
#include <string>
using namespace std;
int main()
{
char c[101];
char d[101];
char e='n';
char f;
char h;
char i[101];
int tentativis;
int tentativie;
bool g=false;
count<<"give me a word to find";
cin.getline(c);
while(e=='n'){
cout<<"give me a letter";
cin>>f;
while(c[i]!='/0'){
if (f==c[i]){d[i]=c[i];
bool g=true;
cout<<d[i];
}
i++;
}
if(g==true){tentativie++;
g=false;
}else{tentativis++;}
cout<<" want you to give me the word? s/n";
cin>>h;
if(h=='s'){cout<<"give me the word";
cin>>i;
if(i==c){cout<<"right you are the winner";
break;}else{cout<<"you has wrong";}
}
cout<<"are you done? s/n";
cin>>e;
}
cout<<"the word was"<<c;
cout<<tentativie<<"right attempts";
cout<<tentativis<<"attempts";
return 0;
}

alka
23-03-2015, 10:39
Questo un forum in italiano: apri le discussioni usando questa lingua, usa i tag di formattazione del codice e un titolo significativo, come richiesto Regolamento (http://forum.html.it/forum/showthread.php?s=&threadid=973887).

Ciao! :ciauz:

Loading