I need a program that will ask 16 true or false questions. The game needs to keep going until the user either answers 8 questions correctly or 8 inncorectly. A message should inform the user wether they won or lost and ask if they would like to play again, at which point the game either loops back to the start or exits. Any and all help would be greatly apprecciated.

Recommended Answers

All 2 Replies

We will HELP, but we won't write it for you. Post some code to show us what effort you have made to write the program, then ask specific question(s).

Start out by creating a character array of 16 questions and their answers. Then in main() create a loop that asks each question, waits for a response, then check the user's answer against the correct answer. You will need two int counters, one to count the number of correct answers and the other to count the number of incorrect answers.

Don't attempt to write all this at one time. Code a little bit, compile, correct errors, then repeat. Many new programmers make the mistake of attempting to write everything all at one time, which can lead to millions of error messages and a lot of confusion. So take it in small steps, even professional programmers do that when they write large programs.

Don't attempt to write all this at one time. Code a little bit, compile, correct errors, then repeat. Many new programmers make the mistake of attempting to write everything all at one time, which can lead to millions of error messages as a lot of confusion. So take it in small steps, evern professional programmers do that when they write large programs.

Amen to that AD! After 30+ years of software development, I still write things a bit at a time. If the structures and interfaces are complex, I stub them out first until I am ready to add substance to them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.