#include<stdio.h>
int leapyear(int y);
int getmonth(int y, int m);
int totalday(int y, int m);
int startday(int y, int m);
void calendar(int y, int m);
void title(int y, int m);/*计算是否是闰年*/
int leapyear(int y)
{if ((y % 4 0 && y % 100 …
1.从键盘输入年份月份
Scanner input new Scanner(System.in);System.out.println("请输入年份: ");int year input.nextInt();//键盘输入年份Scanner inpt new Scanner(System.in);System.out.println("请输入月份: ");int month input.nextInt();//键…
public class Demo03 { //获取每年首日周几 public static int kalendar(int year, int month) { Calendar calendar Calendar.getInstance(); calendar.set(year,0,1,0,0,0); Date date calendar.getTime(); long atYear date.getTime(); int weekday ((year - 1970)*365le…