Question: Write a function rollDice that generates a random number between 1 and 6 , representing a dice roll. Use a static variable within the function
Write a function rollDice that generates a random number between and
representing a dice roll. Use a static variable within the function to keep track
of the total number of rolls across multiple invocations of the function. The
program should allow the user to roll the dice and display the result. After each
roll, the program should also display the total number of rolls so far. Use a loop
to allow the user to roll the dice multiple times.
In C please
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
