Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MP-1431_Asgmt%20%231.pdf 171 100% Q1. Write a program that simulates the rolling of two dice. The sum of the two values should then be calculated. Your

image text in transcribed
MP-1431_Asgmt%20%231.pdf 171 100% Q1. Write a program that simulates the rolling of two dice. The sum of the two values should then be calculated. Your program should roll the two dice 36,000,000 times. Use a one-dimensional array to tally the numbers of times each possible sum appears and print it. Also, determine if the totals are reasonable (i.e., there are six ways to roll a 7, so approximately one-sixth of all the rolls should be 7). (Hint : what is the minimum and maximum sum obtained when you roll a die? Some sums are more frequent than the others.) (10 Points) Q2. Use a vector to read 10 integer numbers, each of which is between 1 and 50. Begin with an empty vector and use its push_back function to add each unique value to the vector. As each number is read, validate it and store it in the array only if it is not a duplicate of a number already read. After reading all the values, display only the unique values that the user entered. (10 Points) Rubrics: Criteris Points (10) Program Requirements 8 Excellent (100%) Meets all requirements and Compiles without any errors Code is clean and well-organized Good Satisfactory (90%) (70%) Program Program oflen functions outputs incorrectly for incorrectly some test inputs Minor issues with Major issues with indentation, indentation variable naming variable naming or organization organization Readability Needs Work to 50%) Program only works in very limited casco not at all No code organization making it hard to od and understand the Logic No com 1 Comments Usclul comments appropriate places Important comments are missing or cessively commented onde Lacking meaningful Comments W 466 ENG US hip

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions