Born Group Interview Question

One program question to calculate total prices. And basic CS knowledge