第二次java作业
package chap1; public class Main { public static void main(String[] args) { int a=50; int b=(a-32)*5/9; System.out.println("华氏度="+b); } }
package chap1; public class Main { public static void main(String[] args) { int a=1; int b=2; int temp = a; a = b; b=temp; System.out.println(a+" "+b); } }
package chap1; public class Main { public static void main(String[] args) { int a=12; int x=12%10; int y=12/10; int sum=x+y; System.out.println("sum="+sum); } }