示例#1
0
unsigned count_reversible(unsigned limit) {
	unsigned counter = 0;
	unsigned i;
	for (i = 1; i < limit; ++i) {
		if (is_reversible(i)) {
			++counter;
		}
	}
	return counter;
}
示例#2
0
文件: main.c 项目: fukanchik/Euler
int
main(int argc, char *argv[])
{
  int i;
  int count;

  for(i = 1, count=0;i<1000000000;++i) {
    int is = is_reversible(i);
    count += is;
  }

  printf("%d\n", count);

  return 0;
}