include stdio include stdlib int main int count sum x2 pc printf Vvedi

 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
#include <stdio.h>
#include <stdlib.h>
int main()
{
int count=0,sum=0,x,x2,pc,f;
printf("Vvedite x=");
scanf("%i", &x );
while (x!=0)
{
x2=x;
while(x2!=0)
{
pc=x2%10;
if (pc==1)
{
sum+=x;
count+=1;
break;
}
x2/=10;
}
scanf("%d", &x);
}
f=sum/count;
printf("\n OTBET= %d \n*********************\n\n",f);
return 0;
}