```python bonus_list = [] while True: years_of_service = int(input("请输入入职年限:")) if years_of_service == -1: break sales_performance = float(input("请输入销售业绩:")) if years_of_service > 5: if sales_performance > 15000: bonus_ratio = 0.2 elif sales_performance > 10000: bonus_ratio = 0.15 elif sales_performance > 5000: bonus_ratio = 0.1 else: bonus_ratio = 0.05 else: if sales_performance > 4000: bonus_ratio = 0.045 else: bonus_ratio = 0.01 bonus = sales_performance * bonus_ratio bonus_list.append(bonus) print(bonus_list) ``` [2024-11-07 01:01:17 | AI写代码神器 | 215点数解答]