Hi,
I was just wondering if you could help me. I would like the user to select "Y" or "N" as to whether their motorbike has a sidecar and then store this answer into the variable.
Could you please help me adapt this;
Thanks in advance!
I was just wondering if you could help me. I would like the user to select "Y" or "N" as to whether their motorbike has a sidecar and then store this answer into the variable.
Could you please help me adapt this;
Code:
cout << "Sidecar (Y/N): "; motorbikeSideCar=getche(); if (toupper(motorbikeSideCar) == 'Y') { cin >> "Yes" >> endl; } else if (toupper(motorbikeSideCar) == 'N') { cin >> "No" >> endl; }
Comment