단일 조건
Last updated
Last updated
import java.lang.*;
public class IfExample1 {
public static void main(String[] args){
int order = 3;
if(order >= 3){
System.out.println("1000원 할인");
}
System.out.println("결제 진행");
}
}import java.lang.*;
public class IfExample2 {
public static void main(String[] args){
int order = 3;
int price = 5000;
int result = order * price;
if(order >= 3){
result -= 1000;
}
System.out.println("결제금액 : " + result + "원");
}
}