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