• 第一次上机作业


    1.package finish;
    
    public class csy {
        public static void main(String[] args) {
            // TODO Auto-generated method stub
                int a = 100;
                int b = 200;
                int c;
                c = a;
                a = b;
                b = c;
                System.out.println("交换后的a:"+ a + ",b:" + b);    
            }
    
    }

    2.package finish;
    import java.util.*;
    public class csy {
    	public static void main(String[] args) {
    		System.out.println("请输入一个1~1000的整数:");
    		Scanner sc = new Scanner(System.in);
    		int a = sc.nextInt();
    		int b, c, d, e, sum;
    		e = a / 1000;
    		b = a / 100 % 10;
    		c = a  / 10 % 10;
    		d = a % 10;
    		sum = b +c +d +e;
         		System.out.println("结果为" + sum);
    		}
    }
    

      

    3.package finish;
    
    public class csy {
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    		double f=100;
    		double c=37;
    		System.out.println((f-32)*5/9);
    			System.out.println(c*9/5+32);	
    		}
    
    }
    

      

    4.package finish;
    public class csy {
    	public static void main(String[] args) {
    		char c='A';
         		System.out.println((char)(c+32));
    		}
    }
    

      

  • 相关阅读:
    192021
    191020
    magento注册
    magento登陆
    把PHP的数组变成带单引号的字符串
    magento直接操作数据库
    兼容各大浏览器的event获取
    手动修改magento域名
    微信支付中的jsapi返回提示信息
    CentOS 下安装xdebug
  • 原文地址:https://www.cnblogs.com/csy521/p/12523327.html
Copyright © 2020-2023  润新知