Visualizzazione dei risultati da 1 a 2 su 2

Hybrid View

  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2015
    Messaggi
    103

    problem basically software in c++

    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‬ <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;
    }

  2. #2
    Moderatore di Programmazione L'avatar di alka
    Registrato dal
    Oct 2001
    residenza
    Reggio Emilia
    Messaggi
    24,472
    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.

    Ciao!
    MARCO BREVEGLIERI
    Software and Web Developer, Teacher and Consultant

    Home | Blog | Delphi Podcast | Twitch | Altro...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.