Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
