Question: Selection of MPCS exams include a fitness test which is conducted on ground. There will be a batch of 3 trainees, appearing for running test in track for 3 rounds. You need to record their oxygen level after every round. After trainee are finished with all rounds, calculate for each trainee his average oxygen level over the 3 rounds and select one with highest oxygen level as the most fit trainee. If more than one trainee attains the same highest average level, they all need to be selected. Display the most fit trainee (or trainees) and the highest average oxygen level. Note: • The oxygen value entered should not be accepted if it is not in the range between 1 and 100. • If the calculated maximum average oxygen value of trainees is below 70 then declare the trainees as unfit with meaningful message as "All trainees are unfit. • Average Oxygen Values should be rounded. Example 1: INPUT VALUES 95 92 95 92 90 92 90 92 90 OUTPUT VALUES Trainee Number: 1 Trainee Number: 3

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
8. Display the most fit trainee or trainees and the highest average oxygen level. Need C, C++, Java, Python, or Perl code for the below question. Important: Do not copy codes from prepinsta.com.
Question: Selection of MPCS exams include a fitness test which is conducted on
ground. There will be a batch of 3 trainees, appearing for running test in track for 3
rounds. You need to record their oxygen level after every round. After trainee are
finished with all rounds, calculate for each trainee his average oxygen level over
the 3 rounds and select one with highest oxygen level as the most fit trainee. If
more than one trainee attains the same highest average level, they all need to be
selected.
Display the most fit trainee (or trainees) and the highest average oxygen level.
Note:
• The oxygen value entered should not be accepted if it is not in the range
between 1 and 100.
• If the calculated maximum average oxygen value of trainees is below 70 then
declare the trainees as unfit with meaningful message as "All trainees are unfit.
• Average Oxygen Values should be rounded.
Example 1:
INPUT VALUES
95
92
95
92
90
92
90
92
90
OUTPUT VALUES
Trainee Number: 1
Trainee Number: 3
Note:
Input should be 9 integer values representing oxygen levels entered in order as
Round 1
• Oxygen value of trainee 1
Transcribed Image Text:Question: Selection of MPCS exams include a fitness test which is conducted on ground. There will be a batch of 3 trainees, appearing for running test in track for 3 rounds. You need to record their oxygen level after every round. After trainee are finished with all rounds, calculate for each trainee his average oxygen level over the 3 rounds and select one with highest oxygen level as the most fit trainee. If more than one trainee attains the same highest average level, they all need to be selected. Display the most fit trainee (or trainees) and the highest average oxygen level. Note: • The oxygen value entered should not be accepted if it is not in the range between 1 and 100. • If the calculated maximum average oxygen value of trainees is below 70 then declare the trainees as unfit with meaningful message as "All trainees are unfit. • Average Oxygen Values should be rounded. Example 1: INPUT VALUES 95 92 95 92 90 92 90 92 90 OUTPUT VALUES Trainee Number: 1 Trainee Number: 3 Note: Input should be 9 integer values representing oxygen levels entered in order as Round 1 • Oxygen value of trainee 1
Reader
95
92
90
92
90
92
90
OUTPUT VALUES
Trainee Number: 1
Trainee Number: 3
Note:
Input should be 9 integer values representing oxygen levels entered in order as
Round 1
• Oxygen value of trainee 1
• Oxygen value of trainee 2
• Oxygen value of trainee 3
Round 2
• Oxygen value of trainee 1
• Oxygen value of trainee 2
• Oxygen value of trainee 3
Round 3
• Oxygen value of trainee 1
• Oxygen value of trainee 2
7 people in
subscribed to
by Trust Pu
• Oxygen value of trainee 3
Output must be in given format as in above example. For any wrong input final
output should display "INVALID INPUT"
C Code:
#include <stdio.h>
int main()
Transcribed Image Text:Reader 95 92 90 92 90 92 90 OUTPUT VALUES Trainee Number: 1 Trainee Number: 3 Note: Input should be 9 integer values representing oxygen levels entered in order as Round 1 • Oxygen value of trainee 1 • Oxygen value of trainee 2 • Oxygen value of trainee 3 Round 2 • Oxygen value of trainee 1 • Oxygen value of trainee 2 • Oxygen value of trainee 3 Round 3 • Oxygen value of trainee 1 • Oxygen value of trainee 2 7 people in subscribed to by Trust Pu • Oxygen value of trainee 3 Output must be in given format as in above example. For any wrong input final output should display "INVALID INPUT" C Code: #include <stdio.h> int main()
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Data Modeling Concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education