Question: 3 . Write a C + + program that does the following: a . Create a C + + file with the name problem 3
Write a C program that does the following: a Create a C file with the name problemcpp b Prompt the user for a positive integer, which represents the number of simulated die rolls. Print "Not playing games." and terminate the program if the user enters an invalid integer. c Use a loop to simulate n die rolls, where for each die roll, print the roll number and the simulated die roll value. d After the last die roll, print the total count of ones rolled. Sample run of the program: Enter the number of die rolls: Roll : Roll : Roll : Roll : Roll : Total number of ones rolled:
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
