1. ## need help guys..........

Modify the program in Part 1 to keep track of the sum of rolling a pair of dice. The possible totals for each roll are 2 to 12.
The theoretical distribution for the totals is shown in the table below. Compare your results with these.

Total Number of combinations Probability
2 1 2.78%
3 2 5.56%
4 3 8.33%
5 4 11.11%
6 5 13.89%
7 6 16.67%
8 5 13.89%
9 4 11.11%
10 3 8.33%
11 2 5.56%
12 1 2.78%

( Total is 2-12:-Row 1, Number of combination 1 to 1:- Row2 ,Probability 2.78% -2.78%:- Row 3)

[
PHP Code:
``` #include <stdio.h> #include <time.h> main(){    int i;    int record[7];    int count=0;    int MAXCOUNT=2000000;    srand(time(NULL));    do{    //User input       printf("Enter the number of trials (max %d): ",MAXCOUNT);       scanf("%d",&count);    }while(!(count>0&&count<=MAXCOUNT));    //zero the array    for(i=1;i<=6;i++){       record[i]=0;    }    //roll and record the value    for(i=0;i<count;i++){       record[rand()%6+1]++;    }    //display Results    printf("Result  Times  Percentage\n");    printf("       Rolled\n");    for(i=1;i<=6;i++){       printf(" %2d  %8d  %5.2f%%\n",i,record[i],record[i]*1.0/count*100);    } }  ```
]
i Hope you Guys understand my question?

Thanx...help needed

2. I understand your question, but I'm not going to do your homework for you.

You need to state what the problem is that you need help with, not "here's the assignment and what I've got so far, please code it up".

3. just need idea(help) .i don't ask any one to write program for me....

4. Well wouln't the total number of combinations divided by two get you your total sum of rolling the dice?

Simply keep track of how many times this is called

Code:
`   record[rand()%6+1]++;`

Since you must hit this at least twice for each roll, so by keeping track of this count then at the end divide by two will get you your total sum.

5. hey thanxx buddy...i "ll will try that...