Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 (10 points) Sacks of Rice Problem Description Several sacks of rice need to be transported to five Orphanage Houses. The heaviest sack will

image text in transcribed

Problem 2 (10 points) Sacks of Rice Problem Description Several sacks of rice need to be transported to five Orphanage Houses. The heaviest sack will go to Orphanage House Al-Yatim because it has the most number of orphanges. The lightest will be sent to Orphanage House Mutiara due to the small number of children staying there. Given a row of rice sacks, decide which sack goes to Al-Yatim? Input The first line is an integer that represent the number of case. The following lines have 5 integers indicating the weights of 5 rice sacks, each separated by a blank. No sack will have a weight of more than 100 unit. Output For each test case, the output contains a line in the format Case #x: followed by a sequence of integers, where x is the case number (starting from 1) and an integer that indicates the weight of a rice sack that will go to Al-Ameen, Sample Input Output Sample Input 4 1 6 10 5 20 5 10 25 31 30 15 5 1 8 7 4 20 50 5 Sample Output Case #1: 20 Case #2: 25 Case #3: 30 Case #4: 50

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions