Exercițiul 2, punctul c

aceași problema am rezolvat-o si eu. sper sa fie bun raspunsul meu