int i = 3;
int sum = 0;
int s;
do
{
s = i * 6;
int k = 0;
k += (s / 100) == 8 1 :0;
k += ((s / 10) % 10 == 8) 1 :0;
k += (s % 10 == 8) 1 :0;
if (k == 1) sum += s;
i++;
} while (s < 999);
printf("result:%dn",sum);
int i = 3;
int sum = 0;
int s;
do
{
s = i * 6;
int k = 0;
k += (s / 100) == 8 1 :0;
k += ((s / 10) % 10 == 8) 1 :0;
k += (s % 10 == 8) 1 :0;
if (k == 1) sum += s;
i++;
} while (s < 999);
printf("result:%dn",sum);