Question: Lab 4: Arrays, For Loops Instructions: Complete the following problems listed below using Ct+ programming. Include necessary comments to your code as needed. Part #1:

 Lab 4: Arrays, For Loops Instructions: Complete the following problems listed

Lab 4: Arrays, For Loops Instructions: Complete the following problems listed below using Ct+ programming. Include necessary comments to your code as needed. Part #1: Write a program to fill a 10 element array of integers with random numbers that fall between 1 and 100. Note: Use srand(time(NULL)); once at the beginning of the program to seed the random number generator. Otherwise, you will generate the same set of random numbers each time. rand) generates a random number from 0 to something huge Be sure to use the following header files: . #includeccstdlib #include Tip: use rand() % 100 +1; to generate numbers from 1 to 10 Part #2: Modify your program to print the contents of the array using a loop

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!