// hw6.cpp : Defines the entry point for the console application. // #include #include #include #include int main(void) { int result; int count; int results[]={0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0}; int srand(int time(NULL)); for(count=0;count<3600;count++) { result=(int)(rand()%6) + (rand()%6); results[result]++; printf("count %d result=%d\n",count,result); } for(count=0;count<11;count++) { printf("results[%2d]=%d\n",count+2,results[count]); // oops u need to transpose this by 2 since thats min result } printf("\n"); return 0; }