#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char *argv[])
{ int x, n, prov, ost, i;
n=-1;
i=0;
x=0;
prov=0;
ost=0;
while (n<1)
{
printf(" vvedite celoe N bolshe 0. N= ");
scanf("%d", &n );
}
printf(" chislo N v proverke na '7' ychastia ne prinimaet ");
for (i=0; i<n; i++)
{
printf(" vvedite celoe chislo ");
scanf("%d", &x );
if (prov==0 && x!=0)
{
if (x%7==0)
prov++;
else
{
x=abs(x);
while (x>1 && prov==0)
{
ost=x%10;
x-=ost;
x/=10;
if (ost%7==0)
prov++;
}
}
}
}
if (prov==1)
printf(" da");
else
printf(" nety");
system("PAUSE");
return 0;
}