Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

=+j Describe the growth and spread of internationalization.

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago