Question: The first input to the program will be an integer number that indicates the number of ingredients. Following this, for each ingredient will be a

The first input to the program will be an integer number that indicates the number of ingredients. Following this, for each ingredient will be a line with the form: Ingredient_Name Price_Per_Ounce Is_Vegetarian Calories_per_Ounce Ingredient_Name is a single word token naming the ingredient. Price_Per_Ounce will be a real value indicating the cost of the ingredient in dollars per ounce. Is_Vegetarian will be the token "true" or "false" indicating whether the ingredient is vegetarian. Calories_Per_Ounce will be an integer indicating the caloric content of the ingredient per ounce. The program should count the number of vegetarian ingredients and report which ingredients provide the highest and lowest ratios of calories per dollar. The output should be formatted as follows: Number of vegetarian ingredients:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
