#include<stdio.h> int main() { int a,b,c,n; int fun(int i); for(n = 100;n < 1000;n++){ a = n / 100; b = (n / 10) % 10; c = n % 10; if(n == (fun(a) + fun(b) + fun (c))){ printf("%d=%d!+%d!+%d!\n",n,a,b,c); } } } int fun(int i) { int s = 1; int l = 1; while(s <= i){ l *= s; s++; } return l; }