MSoC Lab1 problem2