Question: Write a C + + Program that does the following steps: Write a program that does the following steps: a . stores the following fruits
Write a C Program that does the following steps:
Write a program that does the following steps:
a stores the following fruits in the key of a map container:
string SBanana "Date", "Fig", "Grape", "Lemon", "Kiwi", "Watermelon", "Cherry", "Lime", "Raspberry", "Apple", "Blueberry";
b the corresponding dataweights lbs for each fruit is obtained from a random number generator that produces weights having a range Use the randu function to generate the random numbers that has been initialized with the function srand
c After populating the map container, print the entire contents of the container key and dataweight
d After printing the original data, reduce the weight of each fruit by if in excess of lb
e After reducing the weight of the map container, print the entire contents of the container
f After printing the modified map container, count and output the number of fruits having weight lbs
g Print the first letter of each fruit and corresponding weight for the entire map
h Print the entire map showing weight in ounces lb oz
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
