#include<stdio.h>
int main()
{
int i, j, k;
int count = 0;
for (i = 1; i < 100; i++)
{
if (i % 10 == 9 )
{
count++;
}
if (i / 10 == 9)
count++;
}
printf("%d", count);
return 0;
}
千萬不要忘記還有一個99,是兩個數字九!
#include<stdio.h>
int main()
{
int i, j, k;
int count = 0;
for (i = 1; i < 100; i++)
{
if (i % 10 == 9 )
{
count++;
}
if (i / 10 == 9)
count++;
}
printf("%d", count);
return 0;
}
千萬不要忘記還有一個99,是兩個數字九!