Question: Can you store them in vectors instead. And also make it print out to a file or screen thank you Highlight your code from HW32,
Highlight your code from HW32, and copy it using Ctrl-C. Close your project, and create a new project called HW33, with a source file called hw33.c. Press Ctrl-v to copy the old hw32.c code into hw33.c Edit the first line of hw33.c to be /homework 33 Specifications: Modify your program so that the roll of the two dice (and their sum) is produced in a function called toss() Also create a function called num_odd) to calculate the total number of times the sum of the roll of the two dice is odd, and a function called num even) to calculate the total number of times the sum is even. Use the following function prototypes: int toss (void) int num odd (int n, int num[n) int num even(int n, int num[n]): When called, the toss() function rolls two dice (each producing a number between 1-6) and returns the sum. The num odd() function determines the number of times the sum is odd, based on the data in the array. The num even() function determines the number of times the sum is even, based on the data in the array. NOTE: You must create and use the t num and num even tions want it f If you execute the program with the following underlined nputs, the results will be: Enter a random seed: 10 Enter number of random integers to generate: 100 Number of times sum is odd: 48 Number of times sum is even: 52 Percentage of times sum is odd: 48.08 Percentage of times sum is even: 52.0 -5 Use the back page for your LO diagram and pseudocode development. When you have double checked your work, submit your program to the grader program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
