#include <stdio.h>
int main()
{
int a,sum,i,j,n;
do{
printf("n must be >=89 \nn=") ; //because 89 is the smallest number that satisfy the condition...
scanf("%d",&n);
}
while(n<89);
for(i=89;i<n;i++)
{
j=i;
while(j)
{
sum+=j%10;
j/=10;
}
if(sum==17)
a++;
sum=0;
}
printf("There is %d numbers that satisfy the condition.",a);
return 0;
}