Algorithm flow chart for finding the number of hooks within 1000

Source: Internet
Author: User

In the previous lesson, students were assigned three homework questions, one of which was to calculate the number of shares less than 1000, which was described in the flowchart. I think about these three questions carefully based on my attitude towards being responsible to the students before this class, which is the most difficult. If you want to search for the Internet, there is no ready-made search. After more than half an hour of thinking, I finally drew a picture. I didn't take it so seriously when I went to college. But who calls me a teacher now? It cannot be mistaken. Fortunately, the students did not understand it for the first time. They had a flowchart to explain it to them and understood it.

Natural language description:

1. For each a (A = 3 ,......, 1000). Proceed to the next step;
2. For each B (B = a + 1, 2, 3 ,......, 1000). Proceed to the next step;
3. For each C (C = B + 1, 2, 3 ,......, 1000). Proceed to the next step;
4. If a * A + B * B = C * C, the values of A, B, and C are output;
5. End.

The flowchart is as follows:

The following is anotherAlgorithm.

Thank you for your reply!

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.