路过,膜拜9楼。。。
程序代码:
#include <stdio.h> #define get(value, digit) ((value) / (digit) % 10) int main(void) { int i, one, ten, hundred; for(i = 100; i < 1000; i++) { one = get(i, 1); ten = get(i, 10); hundred = get(i, 100); if(one > hundred && hundred > ten && (one + ten + hundred) == (one * ten * hundred)) break; } printf("%d\n", i); return 0; } /* Output: 213 Process returned 0 (0x0) execution time : 0.016 s Press any key to continue. */