How make quiz or answer-question game proqram in C++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How make quiz or answer-question game proqram in C++?

12th Apr 2017, 7:08 AM
Shahin Yusifli
Shahin Yusifli - avatar
6 Answers
0
I think you need a counter to count the correct or wrong answers, each time a question is answered. If a false answer counterFalse=counterFalse +1, if a right answer counterTrue=counterTrue+1. Then at the end, you can show the player total correct and wrong answers by printing counterTrue and counterFalse on the screen int counterTrue =0,counterFalse=0, answer; cout<< Anwer my question <<endl; cin >>answer; If (answer== "a") {counterTrue=counterTrue +1} else {counterFalse =counterFalse +1} I wish this helps (also you can do this by using only one counter)
12th Apr 2017, 7:43 AM
Bülent Gulistan Gözen
Bülent Gulistan Gözen - avatar
0
thank you for helping me) but i want creat to dialog
12th Apr 2017, 9:51 AM
Shahin Yusifli
Shahin Yusifli - avatar
0
Can you explain more about what you want to do?
12th Apr 2017, 9:53 AM
Bülent Gulistan Gözen
Bülent Gulistan Gözen - avatar
0
for example i want print my cod:hello i:hello my cod:how are you i:fine and you (ps.i want creat such proqram)
12th Apr 2017, 9:57 AM
Shahin Yusifli
Shahin Yusifli - avatar
0
can you explain you ?
12th Apr 2017, 9:59 AM
Shahin Yusifli
Shahin Yusifli - avatar
0
You mean you want to chat with computer?
12th Apr 2017, 10:02 AM
Bülent Gulistan Gözen
Bülent Gulistan Gözen - avatar