zoukankan      html  css  js  c++  java
  • 第五周上机作业

    public class fff {
    public static viod main(string[]args){
    for(int m,b,s=0,j;
    {m=i;s=0;
    do{
    b=m%10;
    s=s+b*b*b;
    m=m/10;
    }while(m!=0);
    if(s==i)
    {a[j]=s;j++;}
    }
    System.out.print("水仙花数:
    ");
    }
    System.out.println("%d
    ",a[i]);
    return 0;
    }
    }
    pubilc class fff{
    public static void main(String[] args){
     for(int i=1;i++){
    for(int j=1;j++){
    System.out.print(j+"*"+i+"="+9j*i)+" ");
    }
    System.out.println();
    }
    }
    public class fff {
    
        public static void main(String[] args) {
            int allday = 0;
            int[] days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
            System.out.print("请输入年月日:");
            String dateStr = read.next();
            String[] dateInt = dateStr.split("/");
            int year = Integer.parseInt(dateInt[0]);
            int month = Integer.parseInt(dateInt[1]);
            int day = Integer.parseInt(dateInt[2]);
            for (int i = 0; i < month - 1; i++) {
                allday += days[i];
            }
            allday += day;
            if ((((year % 4 == 0 && year % 100 == 0) || year % 400 == 0) && month > 2)) {
                allday++;
            }
            System.out.println(month + "月" + day + "是" + year + "年的第" + allday + "天");
        }
    }
    public class fff {
        public static void main(String[] args) {
            System.out.println("请输入一个整数:");
            int num=sc.nextInt();
            int result=0;
            while(true)
            {
                int n=num%10;
                result=result*10+n;
                num=num/10;
                if(num==0)
                {
                    break;
                }
            }
            System.out.println(result);
        }
     
    }
  • 相关阅读:
    css3实现轮播2
    css3实现轮播1
    读阮一峰ES6笔记4:字符串的新增方法
    读阮一峰ES6笔记3:字符串的扩展
    应用流策略与检查配置结果
    配置流策略
    配置流行为
    配置流分类
    "流量监管"和"流量整形"的区别
    802.1p 优先级与内部优先级的映射关系
  • 原文地址:https://www.cnblogs.com/fff1479/p/12618479.html
Copyright © 2011-2022 走看看