Sdut Object-Oriented Programming Practice 7 (class and object)

Source: Internet
Author: User
Object-Oriented Programming machine Exercise 7 (class and object) Time Limit: 1000 ms memory limit: 65536 K Use the data members and member functions of the class to perform the following operations: Enter three integers and output their maximum values. Enter three integers. Output the maximum value of three integers. Sample Input
2 8 5
Sample output
8
This will not be detailed, so beginners can try to understand it.

# Include <iostream> using namespace STD; Class Shu {PRIVATE: int A, B, C; public: void biggest () {CIN> A> B> C; if (A <B) A = B; if (a <c) A = C; cout <A <Endl ;}; int main () {class Shu s; s. biggest (); Return 0 ;}


Sdut Object-Oriented Programming Practice 7 (class and object)

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.