Exercise #3: Write a program that finds all students who score the highest and lowest average marks of the first two homework in CS (1). Your program should read the data from a file called "hw2.dat" and displays the output to another file called hw2.out" and on the screen. The first line of the input file contains the number of students, N. The next N lines contain information about the students. Each data line contains student name and his/her marks. The output should display all student names, marks, and grades. In addition, you should output the highest and lowest marks and those who earned them along with the average and the grade of the class If your input file contains: 20 Ali Al-Shikeli Noora Al-Wardi Aisha Al-Rabai Rugaya Al-Moqbalt Karima Al-Rawas Manal Al-Styabi Khalsa Al-Sariri Iman Al-Zadjali Farha Al-Waheibi Ámel Mugabal Mhonira Alabri Amel Khamis Huda Al-Mukheini Nawal Al-Shikeili Rasha Al-Raidan Saif Al-Hashmi Mohamed Al-Kharousi 80 60 70 70 63 88 68 55 80 81 70 78 88 90 78 89 99 87 80 88 83 83 71 70 91 83 75 90 72 96.5 99 89 68 66 71.5 75 రు 90 Mohamimed Al-Badi Ibrahim AL-Mcomari Ishag Al-malki 85 99 Then your output should look like: Student Name Markl Mark2 Avg Mark Grair Ali Al-Shikeli Noorai Al-Wardi Aisha Al-Rabani 80.00 60.00 70.00 81.00 70.00 80.50 65.00 74.00 78.00 C. Ishag Al-malki 99.00 90.00 94 50 The Macimum average mark is: The minimom average mark i Scored by: Scored by: The average of the class The Grade of the class:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Exercise #3: Write a program that finds all students who score the highest and lowest average marks of the
first two homework in CS (). Your program should read the data from a file called "hw2.dat" and displays
the output to another file called "hw2.out" and on the screen. The first line of the input file contains the
number of students, N. The next N lines contain information about the students. Each data line contains
student name and his/her marks. The output should display all student names, marks, and grades. In addition,
you should output the highest and lowest marks and those who earned them along with the average and the
grade of the class.
If your input file contains:
20
Ali Al-Shikeli
Noora Al-Wardi
Aisha Al-Rabani
80
81
70
78
60
70
70
63
Rugaya Al-Mogbali
Kartma Al-Rawas
Manal Al-Styabi
Khalsa Al-Sairi
Iman Al-Zadjali
Farha Al-Waheibi
Amel Mugabal
Munira Alabri
Amel Khamis
Huda Al-Mukheini
Nawal Al-Shikeili
Rasha Al-Raidan
Saif Al-Hashmi
Mohamed Al-Kharousi
Mohammed A-Badi
Ibrahim Al-Meonari
Ishag Al-malki
88
90
78
89
99
87
80
88
83
83
88
68
55
80
71
70
91
83
75
90
72
96.5
89
68
66
99
85
99
71.5
75
65
90
Then your output should look like:
Student Name
Markl
Mark2
Avg. Mark
Grade
Ali Al-Shikeli
Noorai Al-Wardi
Aisha Al-Rabani
80.00
60.00
81.00
70.00
80.50
65.00
74.00
70.00
78.00
Ishaq Al-malki
99.00
90.00
94.50
The Maximum arverage mark is:
The minimum average mark is:
Scared by:
Scored by:
The average of the class.
The Grade of the class:
Transcribed Image Text:Exercise #3: Write a program that finds all students who score the highest and lowest average marks of the first two homework in CS (). Your program should read the data from a file called "hw2.dat" and displays the output to another file called "hw2.out" and on the screen. The first line of the input file contains the number of students, N. The next N lines contain information about the students. Each data line contains student name and his/her marks. The output should display all student names, marks, and grades. In addition, you should output the highest and lowest marks and those who earned them along with the average and the grade of the class. If your input file contains: 20 Ali Al-Shikeli Noora Al-Wardi Aisha Al-Rabani 80 81 70 78 60 70 70 63 Rugaya Al-Mogbali Kartma Al-Rawas Manal Al-Styabi Khalsa Al-Sairi Iman Al-Zadjali Farha Al-Waheibi Amel Mugabal Munira Alabri Amel Khamis Huda Al-Mukheini Nawal Al-Shikeili Rasha Al-Raidan Saif Al-Hashmi Mohamed Al-Kharousi Mohammed A-Badi Ibrahim Al-Meonari Ishag Al-malki 88 90 78 89 99 87 80 88 83 83 88 68 55 80 71 70 91 83 75 90 72 96.5 89 68 66 99 85 99 71.5 75 65 90 Then your output should look like: Student Name Markl Mark2 Avg. Mark Grade Ali Al-Shikeli Noorai Al-Wardi Aisha Al-Rabani 80.00 60.00 81.00 70.00 80.50 65.00 74.00 70.00 78.00 Ishaq Al-malki 99.00 90.00 94.50 The Maximum arverage mark is: The minimum average mark is: Scared by: Scored by: The average of the class. The Grade of the class:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY