Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Read student data in the form Jane Lee 1 0 0 9 8 9 7 1 0 0 Aaron X . Schmidt 3 7 4
Read student data in the form
Jane Lee
Aaron X Schmidt
Frank von Tardy
Use getline to read the name of the student. Then read the next line and convert it to an input string stream. Read the numbers from the input stream, adding them to the total.
Print the name and total score for each student.
students.cpp
#include
#include
#include
using namespace std;
int main
cout "Input file: endl;
string inputfilename;
cin inputfilename;
Your code goes here
string student;
while getlinein student
Your code goes here
cout student : total endl;
return ;
scorestxt
Joe Smith
Mary Jane Chu
Alberto X Gonzales
scorestxt
Mary Jane Chu
Jane Prey
Alberto X Gonzales
Frank von Tardy
Joe Smith
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started