C # language Course November 7

Source: Internet
Author: User

This morning I reviewed some of the commonly used classes in the C # language that I learned yesterday: the String class, the math class, and the DateTime class.

Several representative exercises have been done:

1. Get the current time and add n days to print out the day of the week
1) Enter N, receive
2) Get the current time
3) Add n days to the current time
4) Ask for the day of the week and print

2. Enter your ID number to intercept your birthday.

3. Determine if the mailbox format is correct
1. Have and can only have one @
2. Cannot start with @
There is at least one after [email protected].
[email protected] and. Can't stay together.
5. Cannot end with.

4. Enter the time of the start of the relationship, counting the total number of days until today

1) totaldays procedure:

2) DayOfYear procedure:

Afternoon to learn the array

1. One-dimensional arrays

1)

2)

Enter the number of classes and put all the names in the array
Print out the names of the fifth and sixth.

3) Enter the number of classes, enter each person's score into the array
Calculate the average score

2. Bubble sort

From large to small:

From small to large:

3. Two-dimensional array

Exercise: Print the word "King".

Today's summary: Today through the morning's review and practice has basically mastered the use of the class method. The afternoon study of the array is not well mastered, need to practice skillfully mastered.

C # language Course November 7

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.