Write a complete function named ApplyOffset that accepts dou…