-1
#include <stdio.h>
#include <math.h>
#include <stdlib.h>


   
 
 
   int main ()
{   
    
        int dice1;
	    int dice2;
      
	int  roll , count,counter ,a ;
	int long doubles [13] ={0};
	float frequency=counter+100000000 ,c;
    float percentage=frequency/100000000, d;

	
		dice1 = rand() %6 + 1;
		dice2 = rand() %6 + 1;
       
		for (int roll = 1; roll <=100000000; roll++)
 	        
       if(roll==2
      
         
         
       if(roll==3)
       
       if(roll==4)
       
       if(roll==5)
       
       if(roll==6)
       
       if(roll==7)
       
       if(roll==8)
       
       if(roll==9)
       
       if(roll==10)
       
       if(roll==11)
       
       if(roll==12)
{   
     
     
     

		
}	
	printf ("Sum of Die           Frequency       Percent\n");
	printf ("______________________________________________\n");
            for(count =2;count<=12;count++)
          printf("%2d.\n",count);  
           printf("%d","%f","%%%f",&a,&c,&d);
	{

	}



system ("pause");
return 0;
}

i need help with this 2 dice rolls random 100000000 times then picks the number 2,3,4,5,,,,,12, and how many times it hit and the percentage it hit oni got it to print the way i wanted it to just lost on the rest

Edited by WaltP: Fixed CODE tags -- they aren't that hard.

Votes + Comments
If your post looks bad, feel free to EDIT it to make it look good
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by WaltP
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.