전체 글 (187) 썸네일형 리스트형 [자바] 정올 108 : 입력 - 형성평가3 public class Main { public static void main(String[] args) { int a = 50; double b = 100.12; System.out.printf(b +" * "+a+" = "+ "%.0f", b*a); } } [자바] 정올 107 : 입력 - 형성평가2 public class Main { public static void main(String[] args) { double a = 80.5, b = 22.34; System.out.printf("%10.2f%10.2f%10.2f", a, b, a+b); } } [자바] 정올 106 : 입력 - 형성평가1 public class Main { public static void main(String[] args) { int a= 10, b= 20, c = 30; System.out.println(a + " + " + b + " = " + c); } } [자바] 정올 517 : 입력 - 자가진단9 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double a = sc.nextDouble(); double b = sc.nextDouble(); double c = sc.nextDouble(); System.out.printf("%.3f\n", a); System.out.printf("%.3f\n", b); System.out.printf("%.3f\n", c); } } [자바] 정올 516 : 입력 - 자가진단8 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double a = sc.nextDouble(); double b = sc.nextDouble(); sc.nextLine(); char A = sc.next().charAt(0); System.out.printf("%.2f\n", a); System.out.printf("%.2f\n", b); System.out.println(A); } } [자바] 정올 515 : 입력 - 자가진단7 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(), b = sc.nextInt(); System.out.println(a + " * " + b +" = " + (a*b)); System.out.println(a + " / " + b +" = " + (a/b)); } } [자바] 정올 514 : 입력 - 자가진단6 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("height = "); int a = sc.nextInt(); System.out.println("Your height is "+a+"cm."); } } [자바] 정올 513 : 입력 - 자가진단5 public class Main { public static void main(String[] args) { double y = 2.1, in = 10.5; System.out.printf("%4.1fyd = %5.1fcm\n",y,y*91.44); System.out.printf("%4.1fin = %5.1fcm",in, in*2.54); } } 이전 1 ··· 13 14 15 16 17 18 19 ··· 24 다음