Question: Write a program that does the following steps: a. stores the following 20 fruits in a map container Fruit. pear, banana, apple, fig, date, watermelon,
Write a program that does the following steps:
a. stores the following 20 fruits in a map
pear, banana, apple, fig, date, watermelon, guava, grape, berry,
orange, blueberry, mimosa, mango, mandarin, grapefruit, lemon,
lime, papaya, peach, eldenberry
the associated string is the fruits name and corresponding int value represents the length of each fruit
b. Print the entire map displaying fruit name & word-length
c. Display all fruits having a word-length > 5
d. Calculate the numerical sum of each fruits name and store it in a vector
e. Print the entire vector Sum
f. Calculate the mean(Mean) value of vector Sum
g. Display all fruits having numerical values less than Mea
C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
