Question: c++ Deliverable: 1) Wame the file containing your C+1source code hw 4 sxock epp; where your owe student iD should roplace the string exxxx Tasks:

c++
c++ Deliverable: 1) Wame the file containing your C+1source code hw 4

Deliverable: 1) Wame the file containing your C+1source code hw 4 sxock epp; where your owe student iD should roplace the string "exxxx" Tasks: The aim of this question is so practiee the usage of tandom numbers and arrays in C++. Blavically, you are avked 10 write a C+ pregram as followes. Declare two arrays of sise 5 . One array will stoee the values of sum of selectice and the secced ase will slore the namber of selvetices. Every clement in the two arnays is calculated as follows: generate randem numbers between 6 and 1 unail their sum exceeds Isthen, share the sum as an elemeat in the firs array. The namber of generaled random rambers for that aum is Alored in the secood array. Foe ecample, if the poseram generaled of the there random numbers) and the first element in the second array will be 3 (number of gaveralod random mambers uetil sum exceods soe-. The proggnam will continue until it stares encemests in cach array. For every elemetn to be shored in the firs artay, display the ecreralcd random namibers as given in the sample suput. Finally, the program displays the corput of the rao arrays. Figure 1 shows a sample ontper of the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!