zoukankan      html  css  js  c++  java
  • 第二次java上机

    import java.util.*;
    public class fff{
    public static void main(String args[]){
    Scanner in=new Scanner(System.in);
    int a=in.nextInt();
    switch(a){
    case 1:
    case 5:
    case 10:
    System.out.println("x="+a);break;
    default:System.out.println("x=none");
    }
    }
    }
    import java.util.*;  
    pubilc class fff{
    public static void main(String[] args) { System.out.println("请输入一个数"); Scanner input = new Scanner(System.in); int x=input.nextInt(); if (x/6==0&&x/5==0){ System.out.println("x="+x); } else if (x/5==0){ System.out.println("x="+x); } else if (x/6==0){ System.out.println("x="+x); } else if (x/5!=0&&x/6!=10){ System.out.println("x="+x); } else { System.out.println("none"); } }
    import java.util.*;
    public class fff{
    public
    static viod main(String[] args) System.out.println("输入一个1—100的数字"); Scanner input=new Scanner(System.in); int a=in.nextlnt(); if 90<a<100 println("a"); if 80<a<89 println("b"); if 70<a<79 println("c"); if 60<a<69 println("d"); if a<59 println("e"); else if println("null"); default:System.out.println("null"); } }
    import java.util.*;
    
    public class fff{
     
        public static void main(String[] args) {
             TODO Auto-generated method stub
            int x=0,y=0,z=0;
            Scanner sc=new Scanner(System.in);
            x=sc.nextInt();
            y=sc.nextInt();
            z=sc.nextInt();
            int j;
            if(x>y){
                j=y;
                y=x;
                x=j;
            }
            if(x>z){
                j=z;
                z=x;
                x=j;
            }
            if(y>z){
                j=z;
                z=y;
                y=j;
            }
            System.out.println(x+" "+y+" "+z);
        }
    }
  • 相关阅读:
    HDU 5313 bitset优化背包
    bzoj 2595 斯坦纳树
    COJ 1287 求匹配串在模式串中出现的次数
    HDU 5381 The sum of gcd
    POJ 1739
    HDU 3377 插头dp
    HDU 1693 二进制表示的简单插头dp
    HDU 5353
    URAL 1519 基础插头DP
    UVA 10294 等价类计数
  • 原文地址:https://www.cnblogs.com/fff1479/p/12573496.html
Copyright © 2011-2022 走看看