Răspunsuri

2014-10-01T20:12:59+03:00
Problema trebuie facuta in C++?
#include <iostream.h>
scuuze
ce?
deci?
#include <iostream.h>
using namespace std;
void main ()
{ int a[101], n, i, s, nr=0;
cin>>n;
for (i=1; i<=n; i++) cin>> a[i];
for (i=1; i<=n; i++) { s=0;
while ( a[i] !=0) { s= s+a[i]%10;
a[i]=a[i]/10;
}
if ( s == 0 ) nr++;
}
cout << nr;
}