Question: Q 4 Labs) lab 3 Create a directory called lab3. Submit your source file (must be named lab3.c) and screen shot - the screen shot

 Q 4 Labs) lab 3 Create a directory called lab3. Submit

your source file (must be named lab3.c) and screen shot - the

Q 4

Labs) lab 3 Create a directory called lab3. Submit your source file (must be named lab3.c) and screen shot - the screen shot must include the compilation command with -Wall and the successful running of the program times. You must follow the description in the book except you will generate N random numbers instead of reading the numbers in. You will ask the user for the number of numbers and also ask the user for the upper limit on the numbers. Make 3 runs, run 1: 20 numbers 1-100, run 2:20 numbers 1-100, run 3: 1000 numbers 1-5000 (The first 2 are the same input to test that you are getting two different outputs) Create a function to generate the average of the numbers and the standard deviation. Must print all doubles with only 2 numbers after the decimal point INPUT/OUTPUT: Enter the number of random integers to generate: Enter the upper limit of numbers to generate:

    With numbers from 1 to
      , generated randomly: Smallest: , Largest: , Average: , Std Deviation: . Use the math library functions pow and sqrt DO NOT USE GLOBALS. Must comment your code. 98% Crest - 7.50 6.27 5.04 3.79 2.54 1.27 Principal 163.57 164.80 166.03 167.28 168.53 169.79 Balance 836.43 671.63 505.60 338.32 169.79 0.00 Final payment $171.06 4. a. Write a program that will find the smallest, largest, and average values in a collection of N numbers. Get the value of N before scanning each value in the collection of N numbers. b. Modify your program to compute and display both the range of values in the data collection and the standard deviation of the data collection. To compute the standard deviation, accumulate the sum of the squares of the data values (sum_squares) in the main loop. After loop exit, use the formula sum_squares standard deviation = - average N 5. The greatest common divisor (ged) of two integers is the product of the inte- gers' common factors. Write a program that inputs two numbers and imple- ments the following approach to finding their ged. We will use the numbers -252 and 735. Working with the numbers' absolute values, we find the remainder of one divided by the other

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!