Question: CHALLENGE ACTIVITY 8 . 1 9 . 3 : Arrange the code to process the input of student names and grades. Full screen 5 4

CHALLENGE
ACTIVITY
8.19.3: Arrange the code to process the input of student names and grades.
Full screen
5417083480878 qx3zay7
Consider a file that contains student grades such as the following:
\table[[Jane Lee,100],[Aaron X. Schmidt,37],[Frank von Tardy,2]]
As with the country names, the student names don't have a fixed number of words. To process the input, read one line of input at a time. Then, starting from the end of the line, keep moving toward the beginning until you no longer see digits. Then break the line up into a name and a grade. Remember to remove any spaces between the name and the grade.
Not all lines are useful.
How to use this tool
Mouse: Drag/drop
Keyboard: Grab/release Spacebar (or Enter) Move Cancel Esc
Unused
string grade = line substr (i+1);
int j=i;
string name =1 ine. substr(,j-1);
string name = line. substr(,j+1);
string name =1 ine *substr(,j);
i++;
1--;
while (lisdigit(line[i]))
{
while (isdigit(line[i]))
{
process(name, grade);
while (getline(in, line))
{
main.cpp
Load default template...
#include ;
while (in line)
{
int i=;
int i= line. length()-1;
}
}
j++;
j--;
string line;
}
while && isspace(line[j]))
{
 CHALLENGE ACTIVITY 8.19.3: Arrange the code to process the input of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!