zoukankan      html  css  js  c++  java
  • JAVA作业。

    package a;

    public class ab {

        public static void main(String[] args) {
            // TODO Auto-generated method stub
            int a = 1;
            int b = 2;
            int c = a;
            a = b;
            b = c;
            System.out.println(a);
            System.out.println(b);

        }

    }

    2.public static void main(String[] args) {
    int i=1000;
    int a=i/1000;
    int b=i/100%10;
    int c=i/10%10;
    int d=i%10;
    System.out.println(a+b+c+d);
    }
    }

     3.package a;

    public class ab {

        public static void main(String[] args) {
            // TODO Auto-generated method stub
            float s=22.0f;
            float f=222.0f;
            float sTof=(f-32)*5/9;
            float fToc=s*9/5+32;
            System.out.println("摄氏转华氏="+sTof);
            System.out.println("华氏转摄氏="+fToc);
            }
        }

    4.package a;

    public class ab {

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

  • 相关阅读:
    2021.06.19 DP-方格取数 + 花店橱窗布置
    2021.06.15 DP-编辑距离
    2021.06.12模拟总结
    2021.6.8 背包模拟 总结
    20210529-背包
    lnmp环境中的:supervisorctl
    python常用语法合集
    python 常用数据结构
    DVWA环境
    mysql中each( use () {})
  • 原文地址:https://www.cnblogs.com/Mfb-/p/12523290.html
Copyright © 2011-2022 走看看