Home > Back-end >  Of the new turn, why compile success does not display the results
Of the new turn, why compile success does not display the results

Time:10-19

#include//for 1-2020 a total of how much a '2', 222 contains three 2, for example,
Int main ()
{
Int I, flag=0, n=0;
for(i=1; i<=2020; I++)
{
while(i!=0)
{
Flag=I % 10;
If (flag==2)
{
n++; }
I=I/10;
}
}
Printf (" n=% d ", n);
return 0;

}
  • Related