Răspuns:
#include <iostream>
using namespace std;
int main()
{
int n,p=0,i,j,x,aux,S;
cout<<"n=";
cin>>n;
int a[n][n],b[n][n];
for(i=0;i<n;i++)
for(j=0;j<n;j++)
{
cout<<"a["<<i<<"]["<<j<<"]=";
cin>>a[i][j];
if(a[i][j]%2==0)
p++;
}
for(i=0;i<n;i++)
for(j=0;j<n;j++)
{
S=0;
aux=a[i][j];
while(aux!=0)
{
x=aux%10;
S=S+x;
aux=aux/10;
}
b[i][j]=S;
}
cout<<"nr de elemente pare= "<<p<<endl;
for(i=0;i<n;i++)
for(j=0;j<n;j++)
if(b[i][j]>10)
cout<<a[i][j]<<" ";
return 0;
}
Explicație:
Ma scuzi ca nu l-am pus in fisier, dar nu am ajuns inca pana acolo
Multumesc+5 stele+cel mai inteligent raspuns?