A text file called studentinfo.txt is provided. Each line in the file contains the name of a student, their expected ye

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

A text file called studentinfo.txt is provided. Each line in the file contains the name of a student, their expected ye

Post by answerhappygod »

A text file called studentinfo.txt is provided. Each line in thefile contains the name of a student, their expected year of graduation, and their total score in the class(out of 100). (10 points)Example: Ahmed 2025 88.3A student named Ahmed, who is expected to graduate in 2025, andscored an 88.3% in the course. Write a c++ program called question4.cpp that reads data fromthe text file (you can decide to save this data in arrays if you wish). You then need to answer the followingquestions using your program: - The total number of students in theclass- The number of students named “Ahmed” in theclass- The number of students expected to graduatein 2024 Output the answers to the questions listed above on thescreen.
(Studentinfo.txt)
Ahmed 2025 88.3Charlotte 2026 97.3Michael 2024 89.7Jenna 2024 92.5Ahmed 2024 47.2Noah 2025 67.6Amelia 2023 38.7Ahmed 2025 74.1
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply