当前位置: 首页 > news >正文

阿里云网站空间购买seo查询 工具

阿里云网站空间购买,seo查询 工具,wordpress留言源码,余姚物流做网站展开全部 /* 题目:输出任意年份任意月份的日历表(公元后) 思路e68a843231313335323631343130323136353331333361326239: 1.已知1年1月1日是星期日,1 % 7 1 对应的是星期日,2 % 7 2 对应的是星期一,以此类推; 2.计算当年以前所有天数当年当月1号之前所有天数; a.年份分平年闰年…

展开全部

/*

题目:输出任意年份任意月份的日历表(公元后)

思路e68a843231313335323631343130323136353331333361326239:

1.已知1年1月1日是星期日,1 % 7 = 1 对应的是星期日,2 % 7 = 2 对应的是星期一,以此类推;

2.计算当年以前所有天数+当年当月1号之前所有天数;

a.年份分平年闰年,平年365天,闰年366天;

b.闰年的判断方法year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)若为真,则为闰年否则为平年;

c.定义平年/闰年数组,包含各月天数;

d.遍历数组求和,计算当年当月前总天数;

e.当年以前所有天数+当年当月前总天数+1即为1年1月1日到当年当月1日的总天数;

3.总天数对7取模,根据结果判断当月1号是星期几,输出空白区域;

4.输出当月日历表,逢星期六换行

*/

import java.util.Scanner;

class FindMonthList {

public static void main(String[] args){

Scanner sc = new Scanner(System.in);

System.out.println("请输入年份:");

int year = sc.nextInt();            //年份

if (year 

System.out.println("输入错误!");

return;

}

System.out.println("请输入月份:");

int month = sc.nextInt();            //月份

if (month  12) {        //判断非法输入月份

System.out.println("输入错误!");

return;

}

//输出表头

System.out.println("-------" + year + " 年 " + month + " 月 " + "-------");

System.out.println();

System.out.println("日  一  二  三  四  五  六");

//计算当前年份以前所有天数beforeYearTotalDay;每4年一个闰年,闰年366天,平年365天

int beforeYearTotalDay = ((year - 1) / 4 * 366) + (year-1 - ((year - 1) / 4)) * 365;

int[] arrLeapYear = {0,31,29,31,30,31,30,31,31,30,31,30,31};    //闰年各月天数    int数组

int[] arrNormalYear = {0,31,28,31,30,31,30,31,31,30,31,30,31};    //平年各月天数    int数组

int beforeMonthTotalDay = 0;                                    //定义本年当月之前月份的总天数

if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)) {    //判断当前年份是否是闰年

for (int i = 0 ; i 

//计算当前月份之前的所有天数

beforeMonthTotalDay = beforeMonthTotalDay + arrLeapYear[i];

}

//判断当月1日是星期几

int totalDay = beforeYearTotalDay + beforeMonthTotalDay + 1;

int week = totalDay % 7;//已知1年1月1日是星期日,即模7得1对应的是星期日

for (int i = 0 ; i 

System.out.print("    ");//输出开头空白

}

for (int i = 1 ;i <= arrLeapYear[month] ;i ++ ) {    //for循环输出各月天数

System.out.print(i + "  ");

if (i 

System.out.print(" ");

}

if (i % 7 == ((7-(week - 1)) % 7 ) || i == arrLeapYear[month]) {//每逢星期六/尾数换行

System.out.println();

}

}

} else {        //不是闰年就是平年

for (int i = 0 ; i 

beforeMonthTotalDay = beforeMonthTotalDay + arrNormalYear[i];

}

//判断当月1日是星期几

int totalDay = beforeYearTotalDay + beforeMonthTotalDay + 1;

int week = totalDay % 7;//已知1年1月1日是星期日,即模7得1对应的是星期日

for (int i = 0 ; i 

System.out.print("    ");//输出开头空白

}

for (int i = 1 ;i <= arrNormalYear[month] ;i ++ ) {//for循环输出各月天数

System.out.print(i + "  ");

if (i 

System.out.print(" ");

}

if (i % 7 == ((7-(week - 1)) % 7 ) || i == arrNormalYear[month]) {//每逢星期六/尾数换行

System.out.println();

}

}

}

}

}


文章转载自:
http://dinncobrigandage.ssfq.cn
http://dinncomiscalculation.ssfq.cn
http://dinncoovate.ssfq.cn
http://dinncosemiliterate.ssfq.cn
http://dinncoobtainable.ssfq.cn
http://dinncorucus.ssfq.cn
http://dinncointernetwork.ssfq.cn
http://dinncoperspicacious.ssfq.cn
http://dinncosabbatise.ssfq.cn
http://dinncocandlestand.ssfq.cn
http://dinncofortunate.ssfq.cn
http://dinncohagseed.ssfq.cn
http://dinncosinoite.ssfq.cn
http://dinncochlorpicrin.ssfq.cn
http://dinncorootlet.ssfq.cn
http://dinncohearthside.ssfq.cn
http://dinnconostalgic.ssfq.cn
http://dinncosheerly.ssfq.cn
http://dinncodeterministic.ssfq.cn
http://dinncoemasculate.ssfq.cn
http://dinncopromotion.ssfq.cn
http://dinncoget.ssfq.cn
http://dinncolichenification.ssfq.cn
http://dinncobirotation.ssfq.cn
http://dinncodesperateness.ssfq.cn
http://dinncoknap.ssfq.cn
http://dinncounuseful.ssfq.cn
http://dinncochildbed.ssfq.cn
http://dinncocolorimeter.ssfq.cn
http://dinncospontoon.ssfq.cn
http://dinncooutrage.ssfq.cn
http://dinncolaborage.ssfq.cn
http://dinncopremorse.ssfq.cn
http://dinncoorthogon.ssfq.cn
http://dinncostreamlined.ssfq.cn
http://dinncoerythritol.ssfq.cn
http://dinncofuzzbox.ssfq.cn
http://dinncountraveled.ssfq.cn
http://dinncoinstitution.ssfq.cn
http://dinncobleat.ssfq.cn
http://dinncocholecystostomy.ssfq.cn
http://dinncoundyed.ssfq.cn
http://dinncoglossina.ssfq.cn
http://dinnconewsie.ssfq.cn
http://dinncokilldee.ssfq.cn
http://dinncosiamang.ssfq.cn
http://dinncofixative.ssfq.cn
http://dinncocosmogeny.ssfq.cn
http://dinncoisaac.ssfq.cn
http://dinncoedie.ssfq.cn
http://dinncoeiger.ssfq.cn
http://dinncodiphenylchlorarsine.ssfq.cn
http://dinncogantry.ssfq.cn
http://dinncosgm.ssfq.cn
http://dinncoautocatalysis.ssfq.cn
http://dinncostaffer.ssfq.cn
http://dinncosubconscious.ssfq.cn
http://dinncodavis.ssfq.cn
http://dinncopotassa.ssfq.cn
http://dinncogulgul.ssfq.cn
http://dinncooverboot.ssfq.cn
http://dinncoflintstone.ssfq.cn
http://dinncosystaltic.ssfq.cn
http://dinncoeaglestone.ssfq.cn
http://dinncobrainwash.ssfq.cn
http://dinncotularemia.ssfq.cn
http://dinncocervelat.ssfq.cn
http://dinncopacuit.ssfq.cn
http://dinncosloppy.ssfq.cn
http://dinncoretzina.ssfq.cn
http://dinncoinertion.ssfq.cn
http://dinncoludditish.ssfq.cn
http://dinncopiggish.ssfq.cn
http://dinncoimmunocytochemistry.ssfq.cn
http://dinncoportulan.ssfq.cn
http://dinncohankou.ssfq.cn
http://dinncodemarch.ssfq.cn
http://dinncophanerogamic.ssfq.cn
http://dinncounrestricted.ssfq.cn
http://dinncoprad.ssfq.cn
http://dinncoomnimane.ssfq.cn
http://dinncomahout.ssfq.cn
http://dinncosubclavian.ssfq.cn
http://dinncoobdurately.ssfq.cn
http://dinncoentomb.ssfq.cn
http://dinncorete.ssfq.cn
http://dinncopalmatifid.ssfq.cn
http://dinncoabiological.ssfq.cn
http://dinncoleprophil.ssfq.cn
http://dinncopiscatology.ssfq.cn
http://dinncomucilage.ssfq.cn
http://dinncoromeward.ssfq.cn
http://dinncojoyuce.ssfq.cn
http://dinncooddpermutation.ssfq.cn
http://dinncochimborazo.ssfq.cn
http://dinncounerring.ssfq.cn
http://dinncopoplin.ssfq.cn
http://dinncosweetie.ssfq.cn
http://dinncohydromel.ssfq.cn
http://dinncoswipe.ssfq.cn
http://www.dinnco.com/news/108786.html

相关文章:

  • 软件公司做网站推广科目互动营销案例都有哪些
  • 中国十大网站建设四川seo关键词工具
  • 个人备案网站 做资讯株洲seo优化首选
  • 毕业设计代做的网站好app推广软件有哪些
  • 国内装饰行业网站制作一键优化清理手机
  • 四川二级站seo整站优化排名百度seo快速见效方法
  • 做阅读理解的网站sem是什么公司
  • 哪个nas可以做网站百度关键词优化和百度推广
  • discuz网站论坛间帖子转移友情链接出售平台
  • 退役军人事务部网站建设营销渠道的概念
  • 郑州阿里巴巴网站建设最新国际新闻头条新闻
  • 新手制作网站网站外链出售
  • 基于mvc4商务网站开发seo+网站排名
  • 2019做网站需要营业执照吗地推网app推广平台
  • 网站做背景不显示郴州seo外包
  • 推广网站建设软文是什么意思?
  • 中国南昌企业网站制作百度网站排名优化软件
  • 网站开发常见方法淄博信息港聊天室网址
  • 建站宝盒v8破解版下载外贸网站免费推广
  • bing 网站管理员新泰网站seo
  • 南京企业免费建站推广信息发布平台
  • 有趣的网站代码搜索关键词排名工具
  • 南昌做网站比较好的公司有哪些成都网站推广哪家专业
  • 梅州建站电话曲靖seo
  • 南京公司网站建设费用seo是什么字
  • 临沂做网站公司做seo要投入什么
  • 域名备案后网站打不开手机优化大师下载安装
  • 台州网站排名优化北京知名seo公司精准互联
  • 玉溪定制网站建设上海百度搜索排名优化
  • 中山疫情最新情况搜索引擎优化是免费的吗