I am trying to get my homework assignment to work for class, but I cant seem to get it. Heres the assignment.

kvprajapati commented: This is not a proper way to ask help. -1

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.

#include<iostream>
#include<(time>
using namespace std;

int get_random(int x)
{
    int x=6;


    do
    {

    int seed=(unassigned)time(0);
    srand(seed);

    int answer=rand();
    answer=answer/(RAND_MAX/10);

    while(answer=0,answer<=2,answer--);
    }

This is what I have done so far.

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

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.