#include<stdio.h> int main() { int i = 0, j = 0, k = 0; int S = 0, count = 0, n = 0; printf("請輸入個數:"); scanf_s("%d", &n); for (i = 1; i <= n;i++) for (j = 1; j <= n; j++) for (k = 1; k <= n; k++) { S = i * 100 + j * 10 + k; count++; printf("%d ", S); } printf("\n"); printf("count=%d\n",count); system("pause"); return 0; }