First, use your formula to compile a simple program:
Main ()
{Int year;/* year */
Intw;/* day of the week */
Scanf ("% d", & year );
W = (year-1) + (year-1)/4-(year-1)/100 + (year-1)/400 + 1) % 7;
Printf ("% d \ n", W );
Getch ();
}
Enter 1 during
Python programming implementation input a certain day of a year to calculate the day of the year is the day of the method, python a day
The example in this article describes how to calculate the day of the year by entering the Python programming
#输入某年某月某日, judge that day is the first of the year.
"' Thinking: First, the date is divided into the input or a piece of input, think of if a piece of input may also need to split to find the date
So it is better to divide the input; then consider
Java Date, the day of the year, the abbreviation of the week, the number of days of the month, the number of months of the year, javadate
Import java. util. *; public class DateDemo {public static void main (String args []) {Date date = new Date ();
C # example: write a program to test the standard height and weight, input the date year month day, calculate the day of the year (considering the leap year ),
I. switchStatement exercise example
// Compile a program to test the standard height and
1#include 2#include string>3 using namespacestd;4 intMain () {5cout"Please enter a date:"Endl;6 intA;7Cin>>A;8 BOOLHehe=false;9 if(9999999910000000)Ten { OneHehe=true; A } - while(hehe) - { thecout"the number of date
New Year's legends"Ah --"There was a sudden scream, followed by a few miserable noises. I saw Jin Wu spin body, fly up and fly, the back of the wings has been oblique cut off half, gold as the rain from the wound splash, falling instantly become a
This is the SQL script that calculates the first day of the one month:SELECT DATEADD (mm, DATEDIFF (Mm,0,getdate ()), 0)--the first day of the monthSELECT DATEADD (mm, DATEDIFF (Mm,0,getdate ())-1, 0)-the first day of the monthSELECT DATEADD
Front.
With regard to the select control, it is possible that the date selection effect of the three-level linkage is the most common application. This article is the practice of selecting a box script, and the following is a detailed description
Obtain the year, month, and day of the current week from the year, month, and day of the current week from the year, month, and day of the current day.
PHP code
// Obtain the end date of the latest week corresponding to the year, month, and Day.
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.