Home > database >  From 1 to 100 of a few 1 (normal is 21 my train of thought is to put each number is put forward to s
From 1 to 100 of a few 1 (normal is 21 my train of thought is to put each number is put forward to s

Time:04-22

# include
Int main ()
{
Int b, c, d=0;
for(int i=1; i<=100; I++)
{
B=I;
While (b!=0)
{
C=b % 10;
B=b/10;
If (c=1)
D=d + 1;
}
}
Printf (" % d ", d);
return 0;
}

CodePudding user response:

If (c=1 | | b=1) try

Also, while (b! There are futile=0)
  • Related