- Write a C++ program that simulates the throw of a dice. The program allows the user to enter the number of throws he/she would like to do. The program then, will calculate the statistics of the number of faces appears in these throws. The program should satisfies the following:
a. List the subtasks that are required when breaking down the problem
b. List all functions that you may use in the program
c. Define the functions required for your program and show both precondition as well as postconditions of these functions before implementing them in your code
d. You need to implement all of your program activities in separate functions. Then test your function from within the main function. You should not do any calculation or task in the main function ( apart from calling the functions ).
e. Make sure that the program will not allow the user to enter inappropriate values of the number of throws.
f. In case inappropriate number entered, the program should prompt the user to re-enter the number of throws again until is entered correctly.
g. As soon as the user enters the correct number if throws, then the program do the rest and calculate the statistics required.
uswer
0
Newbie Poster
Recommended Answers
Jump to PostYou've simply pasted what looks like an assignment without even asking for anything. What do you think this is?
Make an attempt. Report back with specific questions when you are stuck.
All 4 Replies
L7Sqr
227
Practically a Master Poster
uswer
0
Newbie Poster
kal_crazy
13
Junior Poster
Jamblaster
15
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.