Question: Use the code attached to this question as a template to start working in your solution. Declare an array that can hold 10 integer numbers.

  1. Use the code attached to this question as a template to start working in your solution.
  2. Declare an array that can hold 10 integer numbers.

    The template code provided already has a for loop that generates 10 random integer numbers, use that for loop to fill up the array using those random numbers.
  3. Print all the numbers in the array to the screen, separated by a comma.

Remember that the numbers are random so you will never get these exact same numbers when you execute your code!!!!!!

code

#include  #include  #include  // Enables use of time() /*************** ***************/ int main(void) { int i, number; srand((int)time(0)); // Unique seed for (i=0; i<10 ;i++) { number = (rand()%100)+1; printf("%d ", number); } printf(" "); return 0; }

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!