progs/lecture2.scala
changeset 367 24f86eb53259
parent 366 d2f895c1dba6
child 384 627a944c744b
equal deleted inserted replaced
366:d2f895c1dba6 367:24f86eb53259
     2 //=================
     2 //=================
     3  
     3  
     4 
     4 
     5 // String Interpolations
     5 // String Interpolations
     6 //=======================
     6 //=======================
     7 
       
     8 
     7 
     9 def cube(n: Int) : Int = n * n * n
     8 def cube(n: Int) : Int = n * n * n
    10 
     9 
    11 val n = 3
    10 val n = 3
    12 println("The cube of " + n + " is " + cube(n) + ".")
    11 println("The cube of " + n + " is " + cube(n) + ".")