lundi 2 juillet 2018

Isalpha() function with while loop c++

##########################################################

/I want to create a while loop that will allow me to input a mix of string numbers until i input string that contains all charachters/ /Also i have a problem with output/

 int main(){
 string name;
 string temp;
 cout << "Enter your name:";
 cin >> name;`enter code here`
`cout << endl;
for(auto a:name){
    `enter code here`if(isalpha(a)){
        `enter code here`temp=name;

   `enter code here` }else{
        `enter code here`while(!isalpha(a)){
            cout << "Enter your name without digit:";
            cin >> name;
            cout << endl;

        }
    }
}
cout << temp << endl;

}

https://i.stack.imgur.com/wtXXc.png

Aucun commentaire:

Enregistrer un commentaire