C++ coding use the ones here #include //atoi #include //strtok #include #include

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

C++ coding use the ones here #include //atoi #include //strtok #include #include

Post by answerhappygod »

C++ coding
use the ones here
#include <stdlib.h>//atoi
#include <string.h>//strtok
#include <iostream>
#include <fstream>
#include <string>
and must be used
using namespace std;
C Coding Use The Ones Here Include Stdlib H Atoi Include String H Strtok Include Iostream Include Fstream 1
C Coding Use The Ones Here Include Stdlib H Atoi Include String H Strtok Include Iostream Include Fstream 1 (47.64 KiB) Viewed 65 times
The ultimate goal of this topic is to complete a simple score calculation system. Consider a gradetxt file that stores a set of (non- unique) teaching assistants for testing. Examples of content are as follows: 4;3; John;84:75:79; Mary:92:86:91; Lisa;50;70:61; Bob:90:99;93; The above example represents a total of 4 students, and each student's corresponding name has 3 test scores, and each score ranges from 0 to 100; the first student John's three test scores are 84, 75, and 79. The second student Mary's three test scores were 92, 86 and 91. The third student, Lisa, has three test scores of 50, 70, and 61. The fourth student, Bob, has three test scores of 90, 99, and 93. The detailed format of the grade.txt file is defined as follows. First, numbers are separated by semicolons. Among them, the first column (::) of the grade.txt file stores a total of 1 student and n exam results in the class. Then, each column starting from the second column of grade.txt file will have a number between 0 and 100 to represent 1 test score. Q1 (30%), write a program that can read the gradetxt file that conforms to the above format, and then let the user input a name, when the program executes the above example of the assessment, the execution screen will print all the test scores corresponding to the student's name from high to high Arrange them to the lowest level, and calculate the average of the test scores (rounded to the nearest whole number). If there is no corresponding student, it will display, No such student. Please type a name: Mary 92;91;86; Avg: 90
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply