When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data.  Write a program to adjust the values by subtracting the smallest value from all the values. Assume that the list will always contain different numbers. Ex. If the list of numbers is:    40  50  10  90  75       The adjusted list is:            30  40  0    80  65 The program first will ask the user to enter the number of integers to be adjusted. Then The following functions should be used:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data.  Write a program to adjust the values by subtracting the smallest value from all the values. Assume that the list will always contain different numbers.

Ex. If the list of numbers is:    40  50  10  90  75

      The adjusted list is:            30  40  0    80  65

The program first will ask the user to enter the number of integers to be adjusted. Then The following functions should be used:

  • The function dataCollection should be called to make a dynamic array to hold the user entered integers. It prompts the user to enter the list of numbers. A pointer to the array should be returned.
  • The function minVal receives an array and its size as arguments. It finds and returns the smallest number in the array.
  • The function adjust receives an array, the array size, and an integer as arguments. It will create an array with the same size as the argument array, but subtract the last argument integer from each element.
  • The function showVal receives an integer array and its size as arguments. It displays the array contents.
  • Function main.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education