exercitiul 4 va rog mult<3

Răspuns:
Am atasat rezolvarea in poza.
Daca nu intelegi ceva, nu ezita sa ma intrebi!