include stdio include stdlib define include locale int main void int f

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
#include <stdlib.h>
#define N 5
#include <locale.h>
int main(void)
{int first[N],l[N],i,k=0,j;
setlocale(LC_ALL, "Russian");
printf("Ââåäèòå ìàññèâ, ïîæàëóéñòà\n");
//ââîä ìàññèâà
for(i=0;i<N;i++)
scanf("%d", first+i);
//çàäà÷à
for(i=0,k=0;i<N;i++)
{j=first[i];
{while(j>0)
{ if(j%10==7)
{
l[k++]=first[i];
break;
}
j/=10;
}
if(first[i]%7==0)
l[k++]=first[i];
}
}
//âûâîä
for(i=0;i<k;i++)
printf("%d ",l[i]);
system("PAUSE");
return 0;
}