Final Exam Online programming topicsBack to exams
There are two questions for this exam, which can be submitted without limitation during the exam.
Warm tips:
1. This exam belongs to the online Judge topic and is enigmatic grading by the system immediately after submission.
2. Students can submit their answers before the test deadline and the system will take the highest score as the final result.
1 Write the Max function of a template type, take the largest of the three input data, and output it (10 points)
Topic content:
Write the Max function of a template type that takes three parameters and returns the largest of them.
Accepts three data (separated by spaces) of the keyboard input in the main function, and outputs the largest value to the screen (there is no white space before or after the output information, and there is no carriage return after the output information)
The type of information entered from the keyboard may be:
English words (not less than 3 letters), separated by a space between two words
English alphabet
Integer
Floating point number
When the program runs, only 3 data inputs of one type are accepted. Then output the largest of them, end the program run
Input format:
Three messages separated by a space
Output format:
A message
Input Sample:
Hellokitty HelloWorld HELLOABC
Sample output:
HelloWorld
time limit: 500ms memory limit: 32000kbSelect language<textarea id="auto-id-1499564443682" class="j-textarea inputtxt" name="inputtxt"></textarea>You can enter the program code directly online here. Submit answer 2 based on the first question, increase the processing of the score. For the processing of fractions, see the example of unit 8th operator overloading in this course (10 points)
Topic content:
On the basis of the first question of this exam, increase the processing of the score.
How to represent fractions: 14/3
Input format:
The format of the input data is the first question in this exam
Output format:
The output format is the same
Input Sample:
3/2 -1/2 14/17
Sample output:
3/2
time limit: 500ms memory limit: 32000kb
Introduction to the _c++ programming of NetEase Cloud Classroom (Next) _ Final exam-Final exam online programming topic