Stuff
public text v1 · immutable#include <stdio.h>
#include <string.h>
int main(void)
{
int x, y, t, c = 0;
char buf[20];
for(x = 0; x <= 9999999; x++)
{
sprintf(buf, "%d", x);
t = 0;
for(y = 0; y < strlen(buf); y++)
{
if(buf[y] == '9') t++;
}
if(t == 3) c++;
}
printf("total: %d\n", c);
}