: hi. im trying to work on a program our teach gave us. i need to wite a program in C, which simulates the rolling of two dice. the program shiuold use rand to roll the first die and use rand again to roll second die. the sum shukld tehn be calculated. the progms shuld roll the two dice 36000 times. we have to use standard librairies, we are jsut learning C . so if ANYONE knows how to do this, or knows if there is a place where i can get help, please do tell! thanks you some, pelse do respond. please, this is worth 150 points and i only have 2 progects. adn this is our first one, i ahve one mroe some otehr time. but this will really count! plesae thank u . i jsut dont know how to do this , if someone can help me , it will be greatly appreciated , thank you.

i think this is the algorithm so far :

: : initialize an int array with 36000 elements if you need to store them, otherwise declare a single int.
: : seed the generator using srand
: : while an array element is empty or if no array just let it loop 36000 times(a for loop will work great here, but any will do)
: : -get random number and put it in the current array element or the int
: : - if you need to print it, use printf() to print it out.

but i dont know how to use srand and rand. some pelase HELP.