rezolvați exercițiul vă rog

Răspuns:
Am atașat rezolvarea mai sus. Îmi cer scuze pentru eventualele greșeli!