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...

#q0V0MW Java 3 seconds ago
Compilation error
  1. Tape.java
  2.  
  3. /*
  4. A Turing machine works on a "tape" that is used for both input and output. The tape is made up of little squares called cells lined up in a horizontal row that stretches, conceptually, off to infinity in both directions. Each cell can hold one character. Initially, the content of a cell is a blank space. One cell on the tape is considered to be the current cell. This is the cell where the machine is located. As a Turing machine computes, it moves back and forth along the tape, and the current cell changes.
  5. A Turing machine tape can be represented by a doubly-linked list where each cell has a pointer to the previous cell (to its left) and to the next cell (to its right). The pointers will allow the machine to advance from one cell to the next cell on the left or to the next cell on the right. Each cell can be represented as an object of type Cell as defined by the class:
  6. public class Cell {
  7. public char content; // The character in this cell.
  8. public Cell next; // Pointer to the cell to the right of this one.
  9. public Cell prev; // Pointer to the cell to the left of this one.
#LwLY63 C++ 5.1 4 seconds ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. num = 1;
  6.  
  7. while ( num < 10)
  8.  
  9. { cout<< num << " ";
#iM3JMG C++ 5.1 9 seconds ago
Compilation error
  1.  
  2. #include <string>
  3. #include <vector>
  4. #include <iostream>
  5.  
  6. typedef std::vector<std::string> Strings;
  7. static std::string GetEnvVariable(const std::string& var) {
  8. std::string ret;
  9. #ifdef WIN32
#vGHuA7 C++ 5.1 22 seconds ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your codnum = 1;
  6. num=1
  7. while ( num < 10)
  8.  
  9. {
#EmlqVY C 39 seconds ago
Compilation error
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. double x, y, size = 15;
  7. char ch = 3;
  8. int print_line = 3;
  9. string message = " Sretno Valentinovo! :) ";
#Xv4G6k Java 44 seconds 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. {
#k3sjTy Java 50 seconds ago
Compilation error
  1. public static void main (String[] args) {
  2.  
  3. String text = "Changing banking for good. Ready to help us change the banking world?";
  4.  
  5. int mystery = text.split("\\s+").length;
  6.  
  7. System.out.println("Mystery = " + mystery);
  8.  
  9. }
#BXsS4O C++ 5.1 59 seconds ago
Compilation error
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. double x, y, size = 15;
  7. char ch = 3;
  8. int print_line = 3;
  9. string message = " Sretno Valentinovo! :) ";
#rame8V C++ 5.1 1 minute ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. num = 1;
  6.  
  7. while ( num < 10)
  8.  
  9. { cout<< num << " ";
#jmtwGR Objective-C 1 minute ago
Success
  1.  
  2. #import <Foundation/Foundation.h>
  3. #import <math.h>
  4. int main (int argc,const char * argv[]){
  5. @autoreleasepool {
  6. double elevar;
  7. int val1;
  8. NSLog(@"ingrese un numero a elevar el numero 2");
  9. scanf("%i",&val1);
#E5qlBk JavaScript (spidermonkey) 1 minute ago
Runtime error
  1.  
  2. function sortLibrary() {
  3. // var library is defined, use it in your code
  4. // use console.log(library) to output the sorted library data
  5.  
  6. for(var i = 0; i < library.length-1; i++){
  7. for(var j = i+1; j < library.length; j++){
  8. if(library[i].title > library[j].title){
  9. var a = library[i];
#NwqQUB C 1 minute ago
Success
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. typedef struct Clube{
  5. char nome[100];
  6. char estadio[100];
  7. }Clubes;
  8.  
  9. int main(void) {
#jpZWa5 Java 1 minute ago
Compilation error
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. double x, y, size = 15;
  7. char ch = 3;
  8. int print_line = 3;
  9. string message = " Sretno Valentinovo! :) ";
#0xI5A2 Python 1 minute ago
Runtime error
  1. def satisfiesF(L):
  2. """
  3. Assumes L is a list of strings
  4. Assume function f is already defined for you and it maps a string to a Boolean
  5. Mutates L such that it contains all of the strings, s, originally in L such
  6. that f(s) returns True, and no other elements
  7. Returns the length of L after mutation
  8. """
  9. for e in L:
#C60wCv C 1 minute ago
Success
  1. // C code
  2. // This program will calculate the sum of 20 positive integers.
  3. // Developer: Derrick CMIS102
  4. // Date: Feb 13,2016
  5. #include <stdio.h>
  6.  
  7. int main()
  8. {
  9. /* variable definition: */
#2sn20a C 1 minute ago
Success
  1. #include <stdio.h>
  2. int main ()
  3. {
  4. /* variable definition: */
  5. int sentinel, count, sum;
  6. double avg;
  7. /* Initialize */
  8. sentinel = 0;
  9. count = 0;
#R2zMzS C 2 minutes ago
Compilation error
  1. #include <stdio.h>
  2. int main ( )
  3. {
  4.  
  5. int emp_num; /* number of employees */
  6. int clock_num; /* employee clock number */
  7. float gross_pay; /* gross pay for week (wage * hours) */
  8. float hours; /* number of hours worked per week */
  9. float wage; /* hourly wage */
#OelXnp C++ 2 minutes ago
Compilation error
  1. #include <graphics.h>
  2. int main()
  3. {
  4. initwindow(400,600);
  5. closegraph();
  6. }
#ujxogQ C 2 minutes ago
Success
  1. #include <stdio.h>
  2. int main ()
  3. {
  4. /* variable definition: */
  5. int count, value, sum;
  6. double avg
  7. ;
  8. /* Initialize
  9. */
#HHpl1o C++ 2 minutes ago
Compilation error
  1. #include <conio.h>
  2. #include <graphics.h>
  3. int main()
  4. {
  5. initwindow(400,600);
  6. getch();
  7. closegraph();
  8. }
#QAlP2b C++ 5.1 30 seconds ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. char a = 'a';
  7. char A = 'A';
  8.  
  9. cout<<((int)a-A)-32;
#A8gbHN C++ 5.1 3 minutes ago
Compilation error
  1. //Program CetakPosNG
  2. // Unput i; jika i>0, cetak"positif"
  3. //Jika tidak, cetak "bukan positif"
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main() {
  8. //kamus
  9. int i;
#Ol406v C 3 minutes ago
Success
  1. // C code
  2. // This program will calculate the average of 19 positive integers
  3. // and one float
  4. // Developer: Alba Paulina Rodriguez CMIS102
  5. // Date: Feb 13, 2016
  6. #include <stdio.h>
  7. int main ()
  8. {
  9. /* variable definition: */
#ufdm50 C 3 minutes ago
Compilation error
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int i;
  6. for(i = 0; i <= 10; i++){
  7. printf("Happy Valentine's Day ");
  8. }
  9. End For
#MUTjtB Java 3 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. {
#jhMJjW Java 3 minutes ago
Compilation error
  1. #include <conio.h>
  2. #include <graphics.h>
  3. int main()
  4. {
  5. initwindow(400,600);
  6. getch();
  7. closegraph();
  8. }
#jtfbK6 C 3 minutes ago
Compilation error
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. typedef struct Clube{
  5. char nome[100];
  6. char estadio[100];
  7. }Clubes;
  8.  
  9. int main(void) {
#lx0akZ C++ 5.1 4 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int num = 10;
  6. int count = 0;
  7. while(num!=0) {
  8. num=num/10;
  9. count++;
#F7OJih Java 4 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. {
#rJlh4Z Java 4 minutes ago
Compilation error
  1. //Geocache by GPS-THSCH
  2. #include <iostream>
  3. #include <math>
  4. #include <conio.h>
  5. Using namespace std;
  6. Int main ()
  7. {
  8. Int a,b,c,d,e,f,g,h,I,j;
  9. Cout<<”Weihnachten 2015 Tag 21:\n\n”;