Granny's Puzzle II
Time Limit: 1 sec
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
Problem Setter: Samia Safa Ahmed