البته روش بازگشتی در این زمینه هم کاربرد دارد: int fact ( int n ) { if ( n == 0 ) return 1; else return ( n * fact(n-1) ); }
int fact ( int n ) { if ( n == 0 ) return 1; else return ( n * fact(n-1) ); }
قوانین سایت