0

How can you make a true or false quiz through c++?

Can you make it so that if you have a cin and you write true it says something like "You said true" ?

8th Oct 2020, 10:23 AM
Lugli
Lugli - avatar
1 Answer
+ 2
You can compare the strings and check their equality. Like: cin >> answer; if(answer == "true") { //some code }
8th Oct 2020, 10:39 AM
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż - avatar