Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.io.Source
- object Ben{
- def fact(k : Int) : Int ={
- if(k == 0)
- 1
- else
- fact(k-1) * k;
- }
- def main(args : Array[String]) : Unit = {
- var n : Int = args(0).toInt;
- println(fact(n));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement