I have a question, how can i use two different sets else if statements that will work properly? i tried it normally but the second set of else if statements dont work at all. please help. thanks
ZeQuia
0
Newbie Poster
Recommended Answers
Jump to Postpost your code so we can see what you did,
Jump to PostTheres Lots of unnecessary/uninitialized variables found in the code.
next here's the proper way of using the rand() function
/* initialize random seed: */ srand ( time(NULL) ); /* generate number ranging from 1 - 7 */ Random1 = rand() % 7 + 1;
Jump to PostSo what does it do wrong? To get help you need to post details, not just a vague "it doesn't work" message. We need to know how it fails in order to understand what "doesn't work" means.
All 9 Replies
zeroliken
79
Nearly a Posting Virtuoso
ZeQuia
0
Newbie Poster
ZeQuia
0
Newbie Poster
ZeQuia
0
Newbie Poster
ZeQuia
0
Newbie Poster
zeroliken
79
Nearly a Posting Virtuoso
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
zeroliken
79
Nearly a Posting Virtuoso
teachMyself
0
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.