This Python program receives the current salary salary and the increase multiplier x (e.g., 0.15 for 15%) and calculates the new salary.
The function adjust_salary performs the calculation, and the main program uses it for an employee.
def adjust_salary(salary: float, x: float) -> float:
return salary * (1 + x)
# Read inputs from user
salary = float(input("Enter current salary: "))
x = float(input("Enter salary increase multiplier (e.g., 0.15 for 15%): "))
new_salary = adjust_salary(salary, x)
print(f"New salary is: {new_salary:.2f}")
New salary is: 11500000.00