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

#qhBPzN Scala 1 hour ago
Success
  1. object Main extends App {
  2. println("h")
  3. }
#sdZt82 Scala 26 seconds ago
Compilation
  1. object Main {
  2. def main(args: Array[String]) {
  3. println(readLine())
  4. }
  5. }
#Uj2hdK Scala 3 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. println(42)
  4. }
#kco3C5 Scala 17 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. }
#baUPR0 Scala 19 hours ago
Success
  1. object Main extends App {
  2. // your code goes here
  3. val mp:Map[String,String] = Map("s"->"one", 2.toString -> "Two")
  4. println(mp)
  5. mp foreach println
  6. }
#DgkK2W Scala 22 hours ago
Compilation error
  1. # /* [ <!-- */ include <stdio.h> /* \
  2. #`{{\
  3. "true" if 0 != 0 and q != """0" ; ` \
  4. \
  5. if [ -n "$ZSH_VERSION" ]; then \
  6. \
  7.   echo exec echo I\'m a zsh script.; \
  8. \
  9. elif [ -n "$BASH_VERSION" ]; then \
#tI4zZS Scala 1 day ago
Success
  1. object Main {
  2. def main(args: Array[String]) {
  3. println("Hello, world!")
  4. val a = 4
  5.  
  6. }
  7. }
#jJzuS9 Scala 1 day ago
Success
  1. object Main {
  2. def main(args: Array[String]) {
  3. println("Hello, world!")
  4. }
  5. }
#Doj1zy Scala 1 day ago
Compilation error
  1. object Main extends App {
  2. def main(args: Array[String]) {
  3. println("Hello, world!")
  4. }
  5. }
#G1qERD Scala 1 day ago
Success
  1. object Main extends App {
  2. sealed trait HList
  3.  
  4. final case class HCons[H, T <: HList](head : H, tail : T) extends HList {
  5. def ::[T](v : T) = HCons(v, this)
  6. }
  7.  
  8. sealed class HNil extends HList {
  9. def ::[T](v : T) = HCons(v, this)
#zysh8L Scala 1 day ago
Success
  1. object Main extends App {
  2. println(java.util.UUID.randomUUID)
  3. }
#TnaG3g Scala 1 day ago
Success
  1. object Main extends App{for(x<-1 to 50)print((x%3,x%5)match{case(0,0)=>"FIZZBUZZ"case(0,_)=>"fizz"case(_,0)=>"buzz"case _=>x})}
#fZMiG1 Scala 1 day ago
Compilation error
  1. object Main extends App {
  2. trait A {
  3. val x = 5
  4. }
  5. println((new String("asdf") with A).x)
  6. }
#eKWor8 Scala 1 day ago
Compilation error
  1. object Main extends App {
  2. val isRunning = true
  3. while(isRunning) {
  4. isRunning = false
  5. }
  6. }
#n4gkLU Scala 1 day ago
Success
  1. object Main extends App {
  2.  
  3. val list = List(1, 2, 3, 4, 5)
  4. val list2 = List(6, 7, 8, 9, 10)
  5.  
  6. println(
  7.  
  8. for{
  9. x <- list
#crfY0g Scala 1 day ago
Success
  1. object Main extends App {
  2.  
  3. println(classOf[(Int, Int) => AnyRef])
  4. }
#BQOqIH Scala 1 day ago
Compilation error
  1. object Main extends App {
  2.  
  3. println(classOf[i => i > 0])
  4. }
#878eRh Scala 1 day ago
Success
  1. object Main extends App {
  2.  
  3. println(`def`[Any])
  4.  
  5. def `def`[T] = List()
  6. }
#xBlFZ7 Scala 1 day ago
Compilation error
  1. object Main extends App {
  2.  
  3. import java.util._
  4.  
  5. println(Arrays.toString(`def`[Any]))
  6.  
  7. def `def`[T] = Array[T](0)
  8. }
#5viCRq Scala 1 day ago
Success
  1. object Main extends App {
  2. val n = readInt()
  3. val numbers = readLine().split(" ").map(_.toInt).toList
  4. val tree = Node(numbers.head)
  5. numbers.tail.foreach(tree.insert)
  6. println(tree)
  7. }
  8.  
  9. case class Node(item: Int, var left: Node = null, var right: Node = null) {
#sJtAZT Scala 2 days ago
Success
  1. object Main extends App {
  2. println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
  3. }
#DXR9mj Scala 2 days ago
Compilation error
  1. object Main extends App {
  2. printlan("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
  3. }
#EQDRZt Scala 2 days ago
Compilation error
  1. object Main extends App {
  2.  
  3. printlan("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
  4. }
#bt6wnx Scala 2 days ago
Compilation error
  1. package eulerProject
  2.  
  3. /**
  4.  * Problem 251: Cardano Triplets.<br>i
  5.  * 20 June 2009<br>
  6.  * <br>
  7.  * A triplet of positive integers (a,b,c) is called a Cardano Triplet if it
  8.  * satisfies the condition:<br>
  9.  * cubeSquare(a + b * root(c)) + cubeSquare(a - b * root(c)) = 1<br>
#ofR4td Scala 2 days ago
Compilation error
  1.  
  2. trait B <: A
  3. class C <: A
  4. object D <: A
#jvVnu9 Scala 2 days ago
Compilation error
  1. object Main extends App {
  2. ["1"].toString();
  3. }
#Mr3TEb Scala 2 days ago
Success
  1. object Main extends App {
  2. var aStr = "Hello";
  3. System.out.println(aStr.length);
  4. }
#ZdR17J Scala 3 days ago
Compilation error
  1. object Main extends App {
  2. def ucapan(tahunHijrah : String) = {
  3. println("Selamat Hari Raya Idul Fitri "+tahunHijrah)
  4. println("Mohon Maaf Lahir Batin")
  5. }
  6.  
  7. def main(args: Array[String]) {
  8. ucapan("1435")
  9. }
#W9Qtnx Scala 3 days ago
Compilation error
  1. object IdulFitri {
  2.  
  3. def ucapan(tahunHijrah : String) = {
  4. println("Selamat Hari Raya Idul Fitri "+tahunHijrah)
  5. println("Mohon Maaf Lahir Batin")
  6. }
  7.  
  8. def main(args: Array[String]) {
  9. ucapan("1435")
#Nz8usp Scala 3 days ago
Success
  1. object Main extends App {
  2. def fizzBuzz(n: Int): String = {
  3. val str = "fizz" * (1 - n % 3) + "buzz" * (1 - n % 5)
  4. if (str != "")
  5. if (n % 15 == 0) str.toUpperCase
  6. else str
  7. else n.toString
  8. }
  9. for(i <- 1 to 50) print(fizzBuzz(i))