C # Selection Statement Exercise 2

Source: Internet
Author: User

1. Input a,b,c three number, calculate the root of the ax²+bx+c of the two-order equation; if a=0, it is not a two-time equation; =b²-4ac, the formula for the root is-b±√b²-4ac/2a; if =b²-4ac>0, the equation has two different roots, if = B²-4ac=0, the equation has two identical roots, and if =b²-4ac<0, the equation has no root.

2. Enter the year, if divisible by 4 and not divisible by 100 into leap years; (Year range is 0-9999)

3. Enter the year, month, day, the month of 31 days, or the month of 30 days, a leap year or an ordinary one.

4. In hamburger, French fries, chicken nuggets, chicken legs, chicken rice Flower Select an item and then print it out, you need to use the branch statement switch case.

C # Selection Statement Exercise 2

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.