#include <stdio.h> int main() { int i,j,a[4],sum=0; for(i=1;i<=2019;i++) { a[0]=i/1000; a[1]=(i%1000)/100; a[2]=(i%100)/10; a[3]=i%10; for(j=0;j<=3;j++) { if(a[j]==9) { sum++; break; } } } printf("%d",sum); return 0; }
while(t)
{
if(t%10 == 9)
{
count++;
break;
}
t = t/10;
}