Question: solve this problem in c++ The Problem Anna is enjoying her time in her grandma's house. Today granny is making Anna's favourite apple pie and

solve this problem in c++

solve this problem in c++ The Problem Anna is enjoying her timein her grandma's house. Today granny is making Anna's favourite apple pie

The Problem Anna is enjoying her time in her grandma's house. Today granny is making Anna's favourite apple pie and Anna is helping her. Just to enjoy the time grandma asked Anna can you solve a simple puzzle of mine? Anna agreed joyfully. Grandma said well Anna suppose there are 5 apples in different weights. You have to sort them according their weights then have to pick the middle one which I goanna use in your apple pie. The Input The Input file contains several test cases. Each case contains 5 floating numbers, weight of 5 apples. The range is in between - 100 to 100. The input file is terminated by EOF. The Output For each line of input you have to print the middle one's weight rounded to 2 decimal points. As you know 0 and (-) minus value can't be the weight. For this kind of input print "Invalid" in a separate line. Sample Input 1.12 2.56 3.25 2.56 0.34 -1.20 -2.56 6.34 0.00 1.56 0.00 1.00 2.00 3.00 4.00 Sample Output Case 1: 2.56 Case 2: Invalid Case 3: Invalid

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!