var i = 1 var j = 1 var s = 0 for (i <- 1 to 9){ for(j <- 1 to i){ s = i*j printf(" " +j+ "*" +i+ "=" +s) } println() }