Translating the problem statement into a series of sequential steps describing what the program must…