Introduction to the _c++ programming of NetEase Cloud Classroom (Next) _ Final exam-Final exam online programming topic

Source: Internet
Author: User

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:

    1. English words (not less than 3 letters), separated by a space between two words

    2. English alphabet

    3. Integer

    4. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.