1 l 2 Cereal Brands and Calories 120 calories - 100 calories- 110 calories- 130 caloies 60 calories 160 calories Froot Loops Apple Jacks Corn Pops Corn Flakes frosted flakes Cinamon Toast Fiber one wheat chex сосоа puffs Honey smacks Oreo O's frosted krispies lucky charms Rice Chex Cookie crisp Reeses Puffs Golden grahams Rice Krispies Special K Corn CHex Waffle Crisp 190 calories- 200 calories- 230 calories- Raison Bran shredded wheat Healthy heart Create A,c++ psudocode using the information given above with the calories and the cereal below it. The first text in the file is a header for the file. Each remaining item is a string of the cereal name and an int representing its calories. With the file reading read the data in, store header in a string variable and the rest of data into a map ( key should be cereal, value should be calories. Calculate the mean calories of all cereals and display the amount in joules 1 calorie = 4.184j. Print out the cereals that are less than the mean and greater than the mean. Also the 2 groups need to be in alphabetical order. Include notes and explanations please. Put in container(map,set,vector,etc). %3D
I need this in a C++ code please. Consider the information in the image.
They have supplied a list of calorie-containing foods in the problem statement. And we need to write the code for the required scenario and get the user input for the list of items as string and the calories as the integer datatype.
Algorithm:
1. Start.
2. Get the user input for the list of items and calories with their specific datatypes like items for items as string and for calories as integers.
3. Store all the required input details in the datatypes like list, dictionary or other any required data containers.
4. Then we need to find the mean for all the required calories of the list like
Mean= (sum of all calories / number of calories)
arrow_forward
Step by step
Solved in 3 steps