SMS: Problem solving using Pascal