编写程序得出1到100的所有整数出现对少次九
2014-12-28 01:38
204 查看
#include <stdio.h> void fun( int n ) { int num = 1; int count = 0; while( num < 100 ) { n = num; while( n!=0 ) { if( n % 10 == 9 ) count++; n = n / 10; } num++; } printf("%d\n",count); } int main() { fun( 100 ); return 0; }
相关文章推荐
- 【c语言】编写程序数一下1到100的所有整数中出现多少次数字9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字 9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字 9
- c语言:编写程序数一下 1到 100 的所有整数中出现多少次数字 9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字9。
- 编写程序数一下1到100的所有整数中出现多少次数字9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字9
- C语言 编写程序数一下1到100的所有整数中出现多少次数字9
- 编写程序数一下1到100的所有整数中出现多少次数字9。
- C语言 编写程序数一下1到100的所有整数中出现多少次数字9。
- 编写程序数一下 1到 100 的所有整数中出现多少次数字9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字9。
- 编写程序数一下1到100的所有整数中出现多少次数字9
- c语言:编写程序数一下 1到 100 的所有整数中出现多少次数字 9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字 9
- C语言:编写程序数一下 1到 100 的所有整数中出现多少次数字 9
- 编写程序数一下 1到 100 的所有整数中出现多少次数字9。
- 编写程序数一下1到100的所有整数中出现多少次数字9