We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Array Of N Elements
Array Of N Elements
Sort by
recency
|
198 Discussions
|
Please Login in order to post a comment
scala
sounds Intresting, i am wondering can we use this concept in my site on my wordpress site? for either better structure or engagement.
Scala: val lst: List[Int] = (1 to num).toList
An array of ( N ) elements is a data structure that holds a fixed-size sequential collection of elements of the same type. Lucky7 login
object Solution extends App {
import scala.io._
val readInt = StdIn.readInt()
def f(num:Int) : List[Int] = {
val list = List.range(0,num)
return list
} println(f(readInt)) }