#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
int count = 0;
for (i = 1; i <= 100; i++)
{
if (i % 10 == 9)
{
count++;
}
if (i / 10 == 9)
{
count++;
}
}
printf("%d\n", count);
system("pause");
return 0;
}
计算1到100中有多少个含9的数字个数
猜你喜欢
转载自blog.csdn.net/qq_44840046/article/details/89504485
今日推荐
周排行