Guest User

Untitled

a guest
Jul 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. uint factorial( uint n ) {
  2. if ( n == 0 ) return 1;
  3. return n * factorial( n - 1 );
  4. }
  5.  
  6. void main() {
  7. assert( factorial( 5 ) == 120 );
  8. }
Add Comment
Please, Sign In to add comment