Hello I have been thinking for a while on how to do this one program in c++. I am trying to make a quiz in c++ with 4 yes or no questions. After the quiz has been taken I want to have it ask another question depending on how many it answered yes to. I have been brainstorming on how I could do this for a while. Any help to get me started in the right direction would be appreciated.
np2100 0 Light Poster
Recommended Answers
Jump to Post— VernonDozier 2,218hi,
how can i make sure that when i ask a yes no question, i don't get rubbish for an answer.
i have tried some while codes, but i seem to do something wrong, because when i execute the program i can enter anything i want...
this is what i …
Jump to Post— WaltP 2,905ah
and I was thinking it was my logic...
thnx very much it works perfectly nowNo it doesn't. Try answering the question with "Supercalifragilisticexpialidocious". Chances are the program will crash because you are stuffing 34 characters into a 4-character array.
Instead of
charuse the C++string. …
Jump to Post— WaltP 2,905Yeah, so? My crystal ball cannot reach into your computer to see your current code.
Jump to Post— Gonbe 32The code will be like this
#include <iostream> int main () { std::cout << "Nice _quality_ necro-post.\n"; return 0; }
All 17 Replies
#include<DAN.h> -4 Light Poster
np2100 0 Light Poster
#include<DAN.h> -4 Light Poster
np2100 0 Light Poster
#include<DAN.h> -4 Light Poster
np2100 0 Light Poster
#include<DAN.h> -4 Light Poster
#include<DAN.h> -4 Light Poster
np2100 0 Light Poster
SpecialeW 0 Newbie Poster
VernonDozier 2,218 Posting Expert Featured Poster
SpecialeW 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
SpecialeW 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
owais16 0 Newbie Poster
Gonbe commented: Necropost (4 year old thread) and to top it with a very stupid post.. +0
Gonbe 32 Newbie Poster
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.