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

Filter by: Bash C C# C++ 5.1 C++14 Haskell Java Java7 Objective-C Pascal (fpc) Pascal (gpc) Perl PHP Python Python 3 Ruby SQL VB.NET more...

#csj589 C 3 minutes ago
Compilation error
  1. #include <stdio.h>
  2. #include <string.h>
  3. /*
  4. int m_atoi(const string* str) {
  5. int re = 0;
  6.  
  7. for (int i=0; str[i] !=0; ++i ) {
  8. re = 10 * re + str[i] - '0';
  9. }
#TLRKFP Java 15 minutes ago
Success
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
#kS0iqA Java 19 minutes ago
Compilation error
  1. #include<stdio.h
  2. void main()
  3. {int i,sun=0;
  4. i=1;
  5. while(i<=10)
  6. {sun=sun+i;
  7. i=i+1;
  8. }
  9. printf(%d\n”,sum);
#YR0ZSp Java 19 minutes ago
Compilation error
  1. import java.util.Scanner;
  2. class Ideone
  3. {
  4. public static void main (String[] args) throws java.lang.Exception
  5. {
  6. Scanner input = new Scanner(System.in);
  7. int i = 23;
  8. int a = input.nextInt();
  9. System.out.printkln(i < a ? "Hi" : "Hello");
#aJAJ0w Java 19 minutes ago
Success
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
#XNAJCv C++14 19 minutes ago
Success
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. /* A binary tree node has data, pointer to left child
  5.   and a pointer to right child */
  6. struct Node
  7. {
  8. int data;
  9. struct Node* left;
#71yBBK R 16 minutes ago
Success
  1. df <- read.csv("stdin", header = TRUE, stringsAsFactors = FALSE)
  2. cat("2016年理髮費用 : \n\n")
  3. d <- as.Date(df$Date)
  4. a <- df$Amount
  5. days <- c(0, diff(d))
  6. total <- c()
  7. for (i in seq_along(a))
  8. #for (i in 1:length(a))#alternative to give the same result
  9. total[i] <- sum(a[1:i])
#QNSadY Java 19 minutes ago
Success
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
#FRNmlk Ada 19 minutes ago
Compilation error
  1. With Ada.Text_IO; Use Ada.Text_IO;
  2. With Ada.Integer_Text_IO; Use Ada.Integer_Text_IO;
  3.  
  4. procedure Program is
  5. begin
  6. -- your code goes here
  7. end Program;
#R9EpkO Java 19 minutes ago
Compilation error
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. public static void main(String[] args)
  9. {
#3uljUb Java 19 minutes ago
Compilation error
  1. abstract class Parent{
  2. public void display() {
  3. System.out.println("Parent display method");
  4. }
  5. }
  6. class Child extends Parent{
  7. public static void main(String args[]){
  8. Parent obj = new Child();
  9. obj.display();
#P1hxMO Java 19 minutes ago
Success
  1. class Greek{
  2.  
  3. int i=1;
  4.  
  5. public int getI(){
  6. System.out.print("Super");
  7. return i;
  8. }
  9.  
#nGcxf1 Python 19 minutes ago
Success
  1. cars = 100
  2. space_in_a_car = 4
  3. drivers = 30
  4. passengers = 90
  5. cars_not_driven = cars - drivers
  6. cars_driven = drivers
  7. carpool_capacity = cars_driven * space_in_a_car
  8. average_passengers_per_car = passengers / cars_driven
#xasROI PHP 19 minutes ago
Success
  1. <?php
  2.  
  3. echo (2+3)*3;
#wWMIur Java 20 minutes ago
Compilation error
  1. https://w...content-available-to-author-only...s.com/shops/the-shallows-film-2k16
  2.  
  3. https://w...content-available-to-author-only...s.com/shops/the-shallows-film-2k16
  4.  
  5. https://w...content-available-to-author-only...s.com/shops/the-shallows-film-2k16
  6.  
  7. https://w...content-available-to-author-only...s.com/shops/the-shallows-film-2k16
#O27Lpr C++ 4.3.2 17 minutes ago
Success
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4.  
  5. int main(void)
  6. {
  7. int a;int j=0;
  8. while(cin >> a){
  9. j++;
#ssIY2r Python 20 minutes ago
Success
  1. # your code goes here
  2. tinggi = 5
  3. string = ""
  4. while (tinggi > 0):
  5. bintang = tinggi
  6. while (bintang < 5):
  7. string = string + "X"
  8. bintang = bintang + 1
  9. print string + "\n"
#MeVb1N Java 20 minutes ago
Success
  1. class A
  2. {
  3. public static void display()
  4. {
  5. System.out.println("Hi I am Parent");
  6. } }
  7. class B extends A
  8. {
  9. public static void display()
#us7nGe C++ 4.3.2 7 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int arr[]={0, 1, 15, 25, 6, 7, 30, 40, 50};
  6. int s=0,n=sizeof(arr)/sizeof(arr[0]),e=n-1;
  7. for(int i=0;i<n-1;i++)
  8. {
  9. if(arr[i+1]>arr[i])
#a2OwAX Ruby 20 minutes ago
Runtime error
  1. str = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","-","/","*"]
  2. s = gets
  3. i = 0
  4. while i <s.length
  5. if s[i] = "length"
  6. break
  7. end
  8. i+=1
  9. end
#9wfcm4 Python 3 2 minutes ago
Success
  1. '''
  2. x x x
  3. o x x
  4. o o x
  5.  
  6.  
  7. 0 1 2
  8. 1
  9. 2
#5uphIU Python 20 minutes ago
Success
  1. # Copy your PatternCount function below here
  2. def PatternCount1(Pattern1, Text):
  3. count_1 = 0
  4. for i in range(len(Text)-len(Pattern1)+1):
  5. if Text[i:i+len(Pattern1)] == Pattern1:
  6. count_1 = count_1 +1
  7.  
  8. return count_1
#YTi8oB Java 16 minutes ago
Success
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
#hv3cUm C++14 19 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int a,b;
  5. cin >>a>>b;
  6. if (a<b){
  7. while (a!=b)
  8. b=b-a;
  9. cout <<b;
#HBfKTk Java 20 minutes ago
Compilation error
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
#i4csb5 PHP 20 minutes ago
Success
  1. <?php
  2. $i = 1;
  3. echo $i++;
  4. echo ++$i;
  5. // your code goes here
#osLxiF Java 19 minutes ago
Success
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. class Main{
  5. public static void main(String[] args){
  6. int choice;
  7. List<String> list=new ArrayList<String>();
  8. Iterator itr=list.iterator();
#qCfLda C 20 minutes ago
Time limit exceeded
  1. #include<stdio.h>
  2. #include<math.h>
  3. int prime(long long int num)
  4. {
  5. long long int i=1,j,k;
  6. int c=0;
  7. while(i<=num){
  8. k=0;
  9. if(num%i==0){
#0A8GEP C++ 20 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4.  
  5. int main() {
  6.  
  7. std::vector<std::string> vec;
  8. std::ifstream F("file.txt");
#EiUOId JavaScript (rhino) 9 minutes ago
Time limit exceeded
  1. importPackage(java.io);
  2. importPackage(java.lang);
  3.  
  4. // your code goes here
  5. function sleep(milliseconds) {
  6. var start = new Date().getTime();
  7. for (var i = 0; i < 1e7; i++) {
  8. if ((new Date().getTime() - start) > milliseconds){
  9. break;