Answer:
See explaination
Step-by-step explanation:
An algorithm can be looked as a procedure or formula for solving a problem, based on conducting a sequence of specified actions.
In most cases we can say a computer program is an elaborate algorithm.
Please kindly check attachment for the step by step solution of the given problem.