ExxonMobil interview question

Write Algorithms using pseudocode