COSC 341 FALL 2017 HomeWork hw0919.txt C Exercises - simple Distributed: 9/19/2017 Due: 9/26/2017 Write the following programs in C. N.B. Your header must include URL of your source code. 1. Given a list of 10 ints, [0 .. 9 ], return 5 random numbers chosen without replacement. Repeat this 5 times with 5 different seeds to the random number generator. ========================================================================= Pseudocode: arr[] = {0, 1, ... 9}; size = 10; numChoices = 5; for i goes from 0 to numChoices - 1: ix = get random number in range [0 .. size -1]; // inclusive both sides output arr[ix]; arr[ix] = arr[size-1] size--; ========================================================================= 2. You are given a list of at most 100 ints, each number in the list is given (at most) once, each number is in the range [0 .. 99 ]. Hardcode the user input -- 19, 17, 13, 11, 7, 5, 3, 2, 1, 31, 29, 23 Output the sorted list. ========================================================================= Pseudocode: byte arr[100] initialized to all zeroes. while (there is more input): x = read next int; arr[x] = 1; for i goes from 0 to 99: if (arr[i] == 1): output i ========================================================================= Turn in: Hard copy and sample run for each exercise. Grade based on: (1) Works (must work on any valid input) (2) Follows specs (3) Style