728x90
Scanner sc = new Scanner(System.in);
System.out.print("일한시간을 입력하세요:");
int time = sc. nextInt();
int pay = 5000;
int total = 0;
if(time>8) {
total = (pay*8)+(int)((time-8)*pay*1.5);
} else {
total = pay * time;
} System.out.println("총 임금은"+total+"입니다. ");
728x90
반응형
'DATA 분석 교육 과정 (2024.02~08) > JAVA_FESTIVAL' 카테고리의 다른 글
[별찍기1] (0) | 2024.03.13 |
---|---|
[1,+-2,+3-4+5-6+7....100 합 구하기] (0) | 2024.03.13 |
[A,B입력=0] (0) | 2024.03.13 |
[감량몸무게] (0) | 2024.03.13 |
[잔돈] (0) | 2024.03.13 |