VS Learning notes for the poor lift

Source: Internet
Author: User

Content:

1. Experience with VS

2. For the study of the for-exhaustive

1, I still use is VS2012 of the novice version, but to it use can directly personally dare to receive the really good good today is I contact about the sixth day of programming, I unexpectedly in unconsciously like every day with "if." Else "," Write "," for "

such as the use of some common words.

VS inside the learning of programming constantly correcting errors, constantly changing the wrong, this is a benign vicious "black" progress (although, I still have been making mistakes, cough) it can let you from the computer programming idiot directly into the programming rookie, a qualitative span. Late will always update their feelings for VS2012-hard to learn the C # language ....

2.for: Plainly, it is all possible to get it all over again;

1) Classic Case:

for (int i=1;i<=100; i++)
{
if (i%7==0| | i%10==7| | i/10==7)//7 multiple, single digit is 7, 10 digits is 7
{
Console.WriteLine (i);//Output I
}

H many complex for-related exhaustive fundamentals are similar in focus

2) for, iteration

Case:

int sum = 0;//assignment is defined as total value
for (int i=1;i<=100;i++)//loop at 1 to 100
{
sum +=i; Sum=sum+i
}

In many programming code, the same variable appears on both sides of the equals sign

3) is the use of the For loop

Example print diamond analysis line I star X-space K x<=2*i-1 k<=4-i

Figure ——— 1 3

--※※※2 3 2

-※※※※※3 5 1

※※※

The code is x<=2*i-1 k<=4-i

for (int i=1; i<=4;i++)//X<=2*i-1 K<=4-i
{
for (int k = 1; k <= 4-i; k++)
{
Console.Write ("");//Chinese in the case of two spaces
}
for (int x = 1; x <= 2 * i-1; ++x)
{
Console.Write ("※");
}
Console.WriteLine ();

}
for (int i=1;i<=3; i++)//minus line due to overlap above
{
for (int k=1;k<=i;k++)
{
Console.Write (""); Ditto
}
for (int x=1;x<=7-2*i; x + +)
{
Console.Write ("※");
}
Console.Write ("\ n");
}

Summarize the list and find out the rules, all through.

The next issue will write about jump statements and recursion and so on.

VS Learning notes for the poor lift

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.