第二次java作业

package Home3;

public class Home3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int a=5;
        float b;
        float c=(float) 3.14;
        b=(float) (a*a*c);
        System.out.println(b);
    }

}

 

package Home3;

public class Home3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        double hua=50;
        double she;
        she=((double) hua-32)*5/9;
        System.out.println(she);
    }

}

package Home3;

public class Home3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        double she=50;
        double hua;
        hua=(double) she*9/5+32;
        System.out.println(hua);
        
    }

}

package Home3;

public class Home3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int a=5,b=8,c;
        c=a;
        a=b;
        b=c;
        System.out.println("a="+a + "\t" +"b="+b);
    }

}

package Home3;

public class Home3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int a=12345,b;
        b=a%1000;
        System.out.println(b);
    }

}

package Home3;

public class Home3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int a=345,b,c,d;
        b=a/100;
        c=a%100/10;
        d=a%10;
        System.out.println(b+c+d);
    }

}

package Home3;

public class Home3 {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        char a='A';
        System.out.println((char)(a+32));
        char b='a';
        System.out.println((char)(b-32));
    }

}

posted @ 2021-03-12 09:47  ♡十梦九你♡  阅读(30)  评论(0编辑  收藏  举报