Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program scanning_into_array_style.c which scans in a certain amount of numbers from the user and fills an array with them. Download scanning_into_array_style.c here,

image text in transcribedimage text in transcribedimage text in transcribed

Write a C program scanning_into_array_style.c which scans in a certain amount of numbers from the user and fills an array with them. Download scanning_into_array_style.c here, or copy it to your CSE account using the following command: \$cp-n /web/dp1091/23T1/activities/scanning_into_array_style/scanning_into_array_style.c. First, it scans in the quantity of numbers from the user. Then, it scans in that many numbers from the user. Once the array is filled with the numbers the user input, call a pre-written function that prints the minimum and maximum values in that array Note: you do NOT need to write the minmax function, it is in the provided code, you are just required to call it properly after filling in the array yourself. This output verifies you scanned in the array correctly. DANGER: Note: For the first couple of days this exercise was released, there was an issue with the starter code that caused the style checker to pick up a nonexistent style issue. This would have caused some of the style-based autotests to fail. If you fetched your code before 2pm on Tuesday, you will need to run the command scanning_into_array_style.c to fix this issue:) \$./scanning_into_array_style How many numbers: 5 Please enter numbers: 1 2 $./scanning_into_array_style How many numbers: 5 Please enter numbers: 1 2 3 4 5 Minimum: 1 Maximum: 5 \$./scanning_into_array_style How many numbers: 4 Please enter numbers: 3 -2 7 1 Minimum: -2 Maximum: 7 HINT: You will know how many integers the user provides. How do you that many times? The code defines a for the max size of the array, you only need to fill the array, up to the number the user provides. For example, if the user enter (as above), you should fill three elements of the array, even though the array contains enough space for elements. For example, if the user enter _ (as above), you should fill three elements of the array, even though the array contains enough space for elements. Assumptions/Restrictions/Hints - The given inputs will always be integers. - The given list of numbers will never be more than 100 numbers. New! You can run an automated code style checker using the following command: $1091 style scanning_into_array_style.c

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions