M
Mitch
when using CIN
How do i make it so user input can be 5 or 6 letters
and
how do i put input into an if else statement ?
Example, i want the user to be able to input a word then program to decide
what word to spit out.
char input;
cout<<"Hi ";
cin>>input
if (input= = "Hello" ){
cout<<"Hello\n";
}
else{
cout<<"goodbye\n";
}
?
TIA
How do i make it so user input can be 5 or 6 letters
and
how do i put input into an if else statement ?
Example, i want the user to be able to input a word then program to decide
what word to spit out.
char input;
cout<<"Hi ";
cin>>input
if (input= = "Hello" ){
cout<<"Hello\n";
}
else{
cout<<"goodbye\n";
}
?
TIA