# 급여 계산하기
#### CODE <a class='btn btn-default' href='/codes/103352'>Link</a>
```
public class JavaCafe {
public static void main(String[] args) {
printPay(10.00, 40);
printPay(10.00, 50);
printPay(7.50, 38);
printPay(8.50, 66);
}
// 시급과 일한 시간을 입력받아, 주급을 출력
public static void printPay(double basePay, int hours) {
double pay = basePay*hours;
/* 해당 메소드를 완성하세요. */
if(hours>40)
pay+=1.5*(hours-40)*basePay;
if(hours>=60)
{
System.out.printf("초과 근무시간 에러!\n");
return;
}
if(basePay<8.00)
{
System.out.printf("최저 시급 에러!\n");
return;
}
System.out.printf("$ %.2f\n", pay);
}
}
```
#### INPUT
```
```
#### OUPUT
```
$ 400.00
$ 650.00
최저 시급 에러!
초과 근무시간 에러!
```