-
Form on the total number of days to put text1 text2 text3 command1 private sub command1 click(). dim daycount as long day of the week on the first day.
dim weeknum as long
Output. dim outtext as stringtext1 is the total number of days.
daycount = val(
text2 is the day of the week for the first day.
weeknum = val(
dim i as long
outtext = "Monday" & vbtab & "Tuesday" & vbtab
outtext = outtext & "Wednesday" & vbtab & "Thursday" & vbtab
outtext = outtext & "Friday" & vbtab & "Saturday" & vbtab & "Sunday" & vbcrlf
for i = 1 to weeknum - 1outtext = outtext & vbtabnextdim k as long
for i = 1 to 7 - weeknum + 1outtext = outtext & i & vbtabk = k + 1
nextouttext = outtext & vbcrlffor i = 1 to daycount - kif i mod 7 = 0 then
outtext = outtext & vbcrlfend if
outtext
end sub
private sub form_load()= 31
2end sub
-
After entering a month of the year, the screen outputs a calendar for that month, with one row per week, starting on Sunday and ending on Saturday.
import ;
public class year
return false;
Return how many days there are in a month and year.
public int getday(int year ,int month);Leap year month.
int day1=;Ordinary month.
if(}/**
The 1st of the month is the day of the week.
public int getweek(int year,int month)
Print it out, quack.
public void showprint(int year,int month)
for(int j=1;j<=day;j++)
j+"\t");
public static void main(string args)}
-
import ;
public class year
return false;
Return how many days there are in a month and year.
public int getday(int year ,int month);Leap year month.
int day1=;Ordinary month.
if(}/**
The 1st of the month is the day of the week.
public int getweek(int year,int month)
Print it out, quack.
public void showprint(int year,int month)
for(int j=1;j<=day;j++)
j+"\t");
public static void main(string args)}
-
I've only made calendars and learned.
-
The landlord is so interesting. After writing it, I said it was in C. 55555555555...
When you're done, run it in C++ IDE and see how it looks.
#include
The first day to get the entered year and month is the day of the week 0 6*
int getdate(int y,int m);
Determine whether the input is a leap month, if yes, it returns 1, otherwise it returns 0*
int leap(int y);
Print the input month calendar*
void print(int y,int m);
int main()
int getdate(int y,int m)
w=(w+days)%7;
return w;*Returns the day of the week on the 1st of the entered month*
void print(int y,int m)
if(leap(y)) month[1]=29;
printf("sun\tmon\ttue\twed\tthu\tfri\tsat");
int i,j;
for(i=0;ifor(i=w,j=1;j<=month[m-1];i++,j++)
printf("********************===="
int leap(int y)
-
import ;
public class demo
int week=sumday%7;
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday");
int k=0;
for(k=0;k<(week+1)%7;k++)int s=1;
while(s<=daymonth(mouth))"\t"+s);
k++;s++;
if(leapyear(year)&&mouth==2)}public static boolean leapyear(int year)
public static int daysum(int year)public static int daymonth(int month)
return day;}}
-
private sub command1_click()dim mymonth as integerdim myyear as integermyyear = val(
mymonth = val(
datediff("d", myyear & "-" & mymonth & "-" & "1", myyear & "-" & mymonth + 1 & "-" & "1")
end sub
private sub form_load()= year(date) 'text1 = 1'text2.
" 'text3 enters the number of days corresponding to the month ="Check"
end sub
Upstairs ** is so long, it's still simple?
Speechless. I wrote one for you, this is really simple and practical, hehe! >>>More
Some exe files are encrypted (packed), you can't see it directly, you have to unshell it first. >>>More
<> method steps: 1. Open VC2010 (or other C language compilers), create a new project - select Win32 as the console application - name - OK. >>>More
1. First of all, define a number of reed structure student, which contains the information of the student. >>>More
Summary. Here's a simple clock written in C** that prints out the current time (in hours, minutes, and seconds): include include int main() return 0; This ** uses the time function and the localtime function in the header file, as well as the printf function and the fflush function in the header file. >>>More