Head A C # Chinese version chapter II Page70 to 73

Source: Internet
Author: User

Let's practice a few more conditional tests and loops. Look at the code below. Circle the condition test and fill in the blanks. Let the annotation explain the code that is being run.

More knowledge of conditional testing you can use the comparison operator to check a variable to do a simple conditional test. Here's how to compare x and y values: x<y (less than) x>y (greater than) x==y (equals) These are the most commonly used.

Then your cycle will keep running! Every time a program runs a condition test, the result is either true or false. If it is true, then your program will cycle more than once. Each loop should have code that returns a false result after the number of runs is sufficient. If not, then the loop is executed until you turn off the program or turn off the computer.

Related Article

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.