+ 1
If statement with boy and girl
So I am making a game, and I want the user to input which gender they are. So something like if boy say something and if girl say sometging different but i cant understand how? https://code.sololearn.com/cjyiWqrnObGQ/?ref=app
1 Antwort
+ 2
char gender;
cout <<"your gender (b/g)";
cin >> gender;
if(gender == 'b')
{ // code for boys }
else
{ //code for gals }