C # Programming Loop exercise

Source: Internet
Author: User

1. Enter an integer to calculate the result from 1 plus to this number

2. Enter an integer and ask 1! +2! The +...+n! and

3. For the number of prime numbers within 100 and

(Prime number: Only 1 is divisible by itself)

1. Cycle within 100, set cycle conditions

2.N is not divisible by any number of its own small, namely n/(n-1)!=0

3.1 is not prime, so start with 2.

4. Print Triangle

5. Rabbit-Born Rabbit
1. Loops can be performed in all months except the first month
2. Rabbit = Last month's Rabbit + last month's Bunny
3. Rabbit = Last month's Baby Bunny
4. Young rabbit = Last month's rabbit plus last month's bunny (the Rabbit this month)

5. The first month is only 1 pairs of young rabbits

The number of rabbits and the number of rabbits in the first n months.

6.9*9 Formula table
Print one row at a line

1. Need to define two cycle conditions

2. Note line breaks and spaces

7. There is a large paper, the thickness of the paper is 0.01m, fold How many times, can reach the height of Everest, according to 8848m to calculate

8. Ideally, the basketball free fall bounce Height If it is the last height of three-fourths, the first height is set to 1 meters, enter a number of times, to find the height of the basketball now bounce

Within 9.100 odd and

1. Find the odd number within 100 and the cycle range is 1-100

2. Odd: cannot be divisible by 2

C # Programming Loop exercise

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.