Răspuns:
1.
#include <iostream>
using namespace std;
int main()
{
int n,cn,k=0;
cin>>n;
cn=n;
while(cn && k<=3)
{
k++;
cn=cn/10;
}
if(n%2==0 && k==4)
cout<<"DA";
else
cout<<"NU";
}
2.
#include <iostream>
using namespace std;
int main()
{
int n,nr,poz=0,neg=0;
cin>>n;
while(n)
{
cin>>nr;
if(nr<0)
neg++;
else
poz++;
n--;
}
cout<<"Numere pozitive:"<<poz<<endl<<"Numere negative:"<<neg;
}