Looking for an inspiration? Below you will find public programs submitted by other users.

Filter by: All Bash C C# C++ 4.8.1 C++11 Haskell Java Java7 Objective-C Pascal (fpc) Pascal (gpc) Perl PHP Python Python 3 Ruby SQL VB.NET Ada Assembler Assembler AWK (gawk) AWK (mawk) bc Brainf**k C++ 4.3.2 C99 strict CLIPS Clojure COBOL COBOL 85 Common Lisp (clisp) D (dmd) Erlang F# Factor Falcon Forth Fortran Go Groovy Icon Intercal JavaScript (rhino) JavaScript (spidermonkey) Lua Nemerle Nice Nimrod Node.js Ocaml Octave Oz PARI/GP Perl 6 Pike Prolog (gnu) Prolog (swi) R Scala Scheme (guile) Smalltalk Tcl Text Unlambda Whitespace

#g9SBPC Scala 4 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i-5)
  3. }
#VBReRY Scala 4 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i-5)
  3. }
#JgtaXn Scala 4 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i-5)
  3. }
#FoN6TI Scala 4 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i-5)
  3. }
#h5KYWp Scala 4 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i*3)
  3. }
#p929bM Scala 4 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i*2)
  3. }
#yrJfKj Scala 4 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i*2)
  3. }
#fTRUeV Scala 6 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 10) println(i*2)
  3. }
#jbejUZ Scala 6 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 1000) println(i)
  3. }
#O4AA89 Scala 6 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 1000) println(i)
  3. }
#d2oWKy Scala 7 hours ago
Success
  1. object Main {
  2. // your code goes here
  3. def main(args: Array[String]) {
  4. println("Test statement")
  5. }
  6. }
#SKDVG3 Scala 8 hours ago
Success
  1. object Main extends App {
  2. for (i <- 1 to 1000) println(i)
  3. }
#w7jn24 Scala 8 hours ago
Success
  1. object Main extends App {
  2. println("hello")
  3. }
#t8LkXZ Scala 8 hours ago
Success
  1. object Main extends App {
  2. println("hello")
  3. }
#9Y4yOC Scala 8 hours ago
Compilation error
  1. object Main exrends App {
  2. println("hello")
  3. }
#VRi6yL Scala 8 hours ago
Compilation error
  1. object main exrends App {
  2. println("hello")
  3. }
#E3jqo1 Scala 9 hours ago
Compilation error
  1.  
#YIKXkj Scala 17 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. def fib(n: Int): Int = {
  4. if (n == 1) 0
  5. else if (n == 2) 1
  6. else {
  7. def go(x1: Int, x2: Int, n: Int): Int = if (n == 0) x2 else go(x2, x1 + x2, n-1)
  8. go(0, 1, n-2)
  9. }
#5rskH7 Scala 22 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. val msg="Ola nildo"
  4. println(msg)
  5. }
#VpZTRf Scala 22 hours ago
Compilation error
  1. object Main extends App {
  2. // your code goes here
  3. msg="Ola nildo"
  4. println(msg)
  5. }
#VsDH9H Scala 23 hours ago
Success
  1. object Main extends App {
  2. val d = List(5, 63, 51, 89)
  3. val ds = d.sortWith(_<_)
  4. ds.foreach(println)
  5. }
#gYezBJ Scala 1 day ago
Success
  1. object Main extends App {
  2. override def main(args: Array[String]) {
  3. println("iamtestinguamtestingstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringiamtestinguamtestingstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstring".length)
  4. }
  5. }
#tDoKD0 Scala 1 day ago
Success
  1. object Main extends App {
  2. println ("hi")
  3.  
  4. }
#rSN71D Scala 1 day ago
Compilation error
  1. object Main extends App {
  2. // your code goes here
  3. def m:Map[Int,String] = Map(6->"pref 1",4 -> "pref 2")
  4. m.foldLeft(0)={case (a, (k, v)) =>
  5. if(k == 2){
  6. a + (k, "Better",v)
  7. }
  8. a
  9. }
#T3LunU Scala 1 day ago
Success
  1. import scala.runtime.SeqCharSequence;
  2. import BCSImplicits._;
  3.  
  4. object BCSImplicits {
  5. implicit def charSeq2Better(cs: CharSequence) = new BetterCharSequence(cs);
  6. //implicit def better2CharSeq(bcs: BetterCharSequence) = bcs.s;
  7. }
  8.  
  9. class BetterCharSequence(val s: CharSequence) {
#xITlDS Scala 1 day ago
Runtime error
  1. object Main extends App {
  2. override def main(args: Array[String]) {
  3. println(Math.pow(10, 5));
  4. for(i <- (2L to Math.pow(10, 5).toLong)) {
  5. print(i + " ");
  6. }
  7. print(Math.pow(10, 9));
  8. println;
  9. println(Math.pow(10, 5));
#x34POT Scala 1 day ago
Success
  1. case class Developer(id: Int, name: String, email: String) {
  2. def rates(p: Project) = Rating(this, p, 0)
  3. }
  4. case class Project(uid: String, ratings: List[Rating])
  5. case class Rating(dev: Developer, proj: Project, rating: Int) {
  6. def by(stars: Int) = Rating(dev, proj, stars)
  7. def line = s"${dev.name} gave ${proj.uid} $rating stars"
  8. }
#eYcFtu Scala 1 day ago
Success
  1. object Main extends App {
  2. println("Hello, world!")
  3. }
#pj15H7 Scala 1 day ago
Compilation error
  1. object Main extends App {
  2. class IntImprovement {
  3. var int = 0;
  4. def this(j: Int) = {this(); int = j;}
  5. def i() = int;
  6. def i=(j: Int) = {int = j;}
  7. def ++() = this.i=(i+1);
  8. def --() = i-=1;
  9. def +=(j: Int) = {i = i+j;}
#qQlwc0 Scala 2 days ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. }