Scala第2章習題PART3

/*8 .編寫一個函數product(s:String),計算前面練習中提到的乘積*/ object HelloScala {   def comput(mString:String): Long =   {     var mLong : Long = 1;     mString.foreach(mLong *= _.toLong)     return mLong   }   def mai
相關文章
相關標籤/搜索