![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA代码
RiverWind1982
这个作者很懒,什么都没留下…
展开
-
用JAVA实现给定日期是星期几的代码
class Dateweek { public static boolean ifleap(int theyear)//是否是闰年 { boolean leap=false; leap = (theyear%400==0)| (theyear%100!=0) & (theyear%4==0); return leap; } public static int daybeforyear(int y,int m ,int d) { int daybefor=0; for原创 2020-10-17 15:51:54 · 428 阅读 · 0 评论 -
用JAVA实现打印菱形
public class lingxin { public static void main(String[] args) { int i,j,k,hang=17; for(i=1;i<=hang/2+1;i++)//打印上面的菱形 { for(j=1;j<=(hang-(2*i-1))/2;j++)//打印该行前面的空格 System.out.pri...原创 2019-06-24 10:24:30 · 1055 阅读 · 0 评论