Search

변수3_문제03_연습예제

대분류
STEP01 변수
소분류
변수3_문제

영상

문제

package 변수3_문제; public class 변수3_문제03_연습예제_문제 { public static void main(String[] args) { // 문제) 모두 true가 되도록 변수의 값을 변경하시오. int a = 0; System.out.println(7 * 2 - a == 3 * -2 - -3); int b = 0; System.out.println(b * b - 25 == 0); int c = 0; System.out.println(3 * c + 2 == 20); int d = 0; System.out.println(5 * d == 2 * 10); } }
Java
복사

해설

package 변수3_문제; public class 변수3_문제03_연습예제_정답 { public static void main(String[] args) { // 문제) 모두 true가 되도록 변수의 값을 변경하시오. int a = 17; System.out.println(7 * 2 - a == 3 * -2 - -3); int b = 5; System.out.println(b * b - 25 == 0); int c = 6; System.out.println(3 * c + 2 == 20); int d = 4; System.out.println(5 * d == 2 * 10); } }
Java
복사