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));
            }
        }

  • 相关阅读:
    Android_Studio常用插件
    Android_Studio 及SDK下载
    Ubuntu 16.04 LTS 正式发布:系统将持续更新5年
    Windows通用应用平台
    Jquery局部打印插件
    WEB打印插件Lodop
    WEB打印插件jatoolsPrinter
    hdu1863
    PromiseKit入门
    高速排序
  • 原文地址:https://www.cnblogs.com/Mfb-/p/12523290.html
Copyright © 2011-2022 走看看