c++ programme(look at images) An organization would like to store in an array up to 100 donations. A donation is a floating-point value. Write a program which reads donations and stores them into an array which is capable of only holding 100 floats. A value of -1 can be used to terminate the input. A sample run would be: Enter donation: 50.00 Enter donation: 20.00 Enter donation: 95.00 Enter donation: -1 As a result the array of donations would look like: Given this, using an additional array of 100 float pointers, sort the contents of the donations arrays without actually moving any data in the donations array. To do this, each element of the array of pointers should be pointing to the corresponding element of the donations array. Once this has been done, simply reorder the pointers to point to the elements of the donations array in ascending order. Your pointers array should look like this: Print out the collection of numbers sorted using the pointers array

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section: Chapter Questions
Problem 5PP
icon
Related questions
Question

c++ programme(look at images)

An organization would like to store in an array up to 100 donations. A donation is a floating-point value. Write a program which reads donations and stores them into an array which is capable of only holding 100 floats. A value of -1 can be used to terminate the input. A sample run would be:
Enter donation: 50.00
Enter donation: 20.00
Enter donation: 95.00
Enter donation: -1
As a result the array of donations would look like:
Given this, using an additional array of 100 float pointers, sort the contents of the donations arrays without actually moving any data in the donations array.
To do this, each element of the array of pointers should be pointing to the corresponding element of the donations array.
Once this has been done, simply reorder the pointers to point to the elements of the donations array in ascending order. Your pointers array should look like this:
Print out the collection of numbers sorted using the pointers array

An organization would like to store in an array up to 100 donations. A donation is a floating-
point value. Write a program which reads donations and stores them into an array which
is capable of only holding 100 floats. A value of -1 can be used to terminate the input. A
sample run would be:
Enter donation: 50.00
Enter donation: 20.00
Enter donation: 95.00
Enter donation: -1
As a result the array of donations would look like:
50.00
20.00
95.00
?
?
Given this, using an additional array of 100o float pointers, sort the contents of the
donations arrays without actually moving any data in the donations array.
To do this, each element of the array of pointers should be pointing to the corresponding
element of the donations array.
50.00
20.00
95.00
?
Once this has been done, simply reorder the pointers to point to the elements of the
donations array in ascending order. Your pointers array should look like this:
50.00
20.00
95.00
?
?
Print out the collection of numbers sorted using the pointers array.
Transcribed Image Text:An organization would like to store in an array up to 100 donations. A donation is a floating- point value. Write a program which reads donations and stores them into an array which is capable of only holding 100 floats. A value of -1 can be used to terminate the input. A sample run would be: Enter donation: 50.00 Enter donation: 20.00 Enter donation: 95.00 Enter donation: -1 As a result the array of donations would look like: 50.00 20.00 95.00 ? ? Given this, using an additional array of 100o float pointers, sort the contents of the donations arrays without actually moving any data in the donations array. To do this, each element of the array of pointers should be pointing to the corresponding element of the donations array. 50.00 20.00 95.00 ? Once this has been done, simply reorder the pointers to point to the elements of the donations array in ascending order. Your pointers array should look like this: 50.00 20.00 95.00 ? ? Print out the collection of numbers sorted using the pointers array.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Array
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
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning