You are to write a program dice1.c which will generate ten (10) simulated rolls of a pair of dice. These values along with the total of each roll should be saved in a two-dimensional array and printed in a labeled table. You should then save the two values for each roll in a text file called rolls10.dat, each pair followed by a newline character.
To learn about generating random numbers, you should start by reading the man page for srand(). Then proceed with the Generating Random Values page.
Using the following compiler directive and declarations
#define MAXROLLS 10
struct roll_s {
int die1,
die2,
total; };
struct roll_s rolls[MAXROLLS];
write a program named dice2.c which reads in ten rolls of a pair of dice from the file rolls10.dat and stores them in an array of structs declared as above.
Your program must follow the pseudocode provided below.
N.B. A graceful exit from the program is required if the user-specified file does not exist.