8 Years
Discussion Span
Last Post by saphar

Please I need urgent help.
Because it is due tomorow. Can somebody help me.


What have you tried? Post the code you have worked on and maybe someone will be able to point out why it is not working.


Well, the thing is that I dont understand the random number coding. How to use it.

using namespace std;

int get_random(int x)
    int x=6;


    int seed=(unassigned)time(0);

    int answer=rand();


This is what I have done so far.

Edited by Dani: Formatting fixed


Let me give the steps to follow assuming that the random function that you have written gives some random number for each call.

You need to call this 3 time for one roll. (Use a loop here)
It is given in the PDF that each player is given 3 chances (nest the above loop inside another loop that loops 3 times).
In the second loop you get the random number 3 times. And check for the condition for scores.
Sum all the individual scores.
That’s it

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.