ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 27 May 2017 My Price 9.00

loan am calculator

Need help on problem #2 (loan am calculator). Need the help asap as it is due tonight. Thanks

 

1Due Date: Monday, Feb. 15, 2016 before 11:55pm.Purpose:This homework involves some further basics of C++ programming,specifically loops. You will also get to work with random numbers again, which areimportant in formulating solutions to a multitude of problems in the scientific communityand elsewhere (see the motivation for the introduction of random number generation inthe last homework assignment (i.e., HW2)).Instructions:The instructions are similar to previous homework’s:This is an individual, not collaborative assignment; remember to be carefulwith naming rules; etc. See the HW 1 or HW2 descriptions for more details.Problem A: Tossing a Fair DieWrite a C++ program that simulates tossing a fair six-sided die. Your program shoulddo the following:1. Ask the user to input a random seed (of typeint), and callsrandwith thenumber that is input as its argument. Thus, right after the variable declarations inyour program, you should have the lines:cout << "Input the random seed: ";cin >> seed;srand(seed);2. Use thecstdlibfunctionrand()to generate a random number between 1 and 6.Note that the number 1 corresponds to one dot on the side of a die; the number 2corresponds to two dots on the side of a die, and so on for the numbers 2, 3, 4,5, and 6, where each number represents the number of dots on the side of a six-sided die. All possibilities (one dot through six dots) should be equally likely tooccur when a die is rolled. Repeat this process 100 times, and keep a count ofthe number of times each dot occurs when the die is rolled.3. Repeat Step 2 (i.e., generate another 100 random numbers) and count the number oftimes each number of dots surfaces on the die.4. Print out the results, that is, the counts for each time each side of the die was rolled,and the average value for the 100 rolls of the die for each set.

Attachments:

Answers

(11)
Status NEW Posted 27 May 2017 03:05 AM My Price 9.00

-----------

Attachments

file 1495855184-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)