Răspuns:
{
unsigned int n,i,nr1=0,nr2=0;
cout<<"n=";
cin>>n;
int a[n];
for(i=0; i<n; i++)
{
cout<<"a["<<i<<"]=";
cin>>a[i];
}
for(i=0;i<n;i++)
{
nr1=0;
while(a[i]!=0)
{
a[i]=a[i]/10;
nr1++;
}
if(nr1<=3)
nr2++;
}
if(nr2==n)
cout<<"DA";
else cout <<"NU";
return 0;
}
Explicație: