0504 If statement (judging the marriage condition and the unary two-time equation)

Source: Internet
Author: User

Case LIST:

First, the conditions of marriage, have a room? You got Money? Are you capable?

Train of thought: 1, if have room, can marry

2, if there is no room, ask the second condition of money, if there is, can be married

3, if no room without money, then ask the third condition has the ability, if there is, can marry

4, if the above three conditions are not, then bye

Second, Judge A*x*x+b*x+c=0 whether the equation is a two-dimensional equation, and determine the root of the situation

Ideas: 1, first understand what is called a two-time equation, when a is not equal to 0, this equation is a two-time equation

2, according to the formula Derta=b*b-4*a*c to determine the root of the situation

①derta>0, the equation has two unequal real roots

②derta=0, the equation has two equal real roots

When ③derta<0, the equation has no real roots

3, first of all to determine whether this equation is a two-time equation, if it is, in judging the root of the situation

0504 If statement (judging the marriage condition and the unary two-time equation)

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.