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

#DbQ8g5 C++14 55 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int i = 10;
  7. int B = 0;
  8. while(i<0) {
  9. i--;
#04Z01f Java 54 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. {
#PrfJHq Pascal (fpc) 55 minutes ago
Compilation error
  1. program q1;
  2. var k,x,y,i,n:integer;
  3. s:longint;
  4. begin
  5.  
  6. readln(n);
  7. readln(a);
  8.  
  9. x:=a;
#ekn4BH Java 55 minutes ago
Compilation error
  1. public static boolean isAlmostPal(String word, int count){
  2. //base - count has to be 1 and not zero because 0 would mean it is a palindrome - 1 means it was 1 increment away
  3. if(word.length() == 1 && count == 1|| word.length() == 0 && count ==1){
  4. return true;
  5. }
  6. //increment word beginning and decrement end - if it doesn't equal add it to a count - if count is over 1 return false
  7. if(word.charAt(0) == word.charAt(word.length()-1) && word.length()-1 > 1){
  8. return isAlmostPal(word.substring(1, word.length()-1), count);
  9. } else if(count < 1 && word.length()-1 > 1){//word.charAt(0) != word.charAt(word.length()-1)){
#MgRUDL Java 55 minutes ago
Compilation error
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3. def probabilidad(x1,x2,a):
  4.  
  5. n=100
  6. X=(x2-x1)/a
  7. X2=(x2+x1)/a
  8. D=((n*np.pi)*X)
  9. D1=((n*np.pi)*X2)
#JyPaIA C++14 53 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <map>
  3. #include <string>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9. // your code goes here
#TdH8vP Haskell 55 minutes ago
Compilation error
  1. j([])=[]
  2. j(a)=[show $ head a]++j(tail a)
  3.  
  4. f([],b,c,d,e,f)=f
  5. f(a,b,c,d,e,f)=if (elem (take 1 $ a) b)==True then f(drop 1 $ a,b,c++(take 1 $ a),d,e,f)
  6. else if (take 1 $ a)=="+" then f(drop 1 $ a,b,[],d+(read c::Int)*e,1,take 1 $ a)
  7. else if (take 1 $ a)=="-" then f(drop 1 $ a,b,[],d+(read c::Int)*e,-1,take 1 $ a)
  8. else f(drop 1 $ a,b,c,d,e,f)
#2vFnpk C++14 55 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. /*bool poh(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
  5. {
  6. double Ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
  7. if (Ua >= 0 && Ua <= 1)
  8. {
  9. return true;
#NT9r9F Python 3 55 minutes ago
Compilation error
  1. for n in range(2,15):
  2. for x in range(2,n):
  3. if n%x==0:
  4. print(n, 'is not a prime no',n, 'equals', x,'*',n//x)
  5. break
  6. else:
  7. print(n 'is a prime no')
  8.  
  9.  
#GFcuLx Java 56 minutes ago
Compilation error
  1. class Sorts
  2. {
  3. // bubble sort
  4. public static int[] bubbleSort(int[] array)
  5. {
  6. int pass = 0;
  7. boolean sorted = true;
  8. do
  9. {
#teepxi C++ 5.1 56 minutes ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int litros;
  6. int x;
  7. cout<<"\nQuantos litros de agua tem no viveiro?";
  8. cin>>litros;
  9. for (x=litros; x<4; x++)
#g2oLkZ C 55 minutes ago
Success
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a=2;
  5.  
  6. a+=0x3fffffff;
  7.  
  8. printf("%d %d\n",a,0x3fffffff);
  9.  
#7OKtSY C++14 37 minutes ago
Success
  1. #include <iostream>
  2. #include <list>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. list <int> d1;
  8. list <int>::iterator iter;
  9. int i;
#FOFNZN Java 56 minutes ago
Success
  1. class A {
  2. public static void main(String args[]) {
  3. boolean cond1=false, cond2=true;
  4. int x=cond1 ? 5 : 10;
  5. int y=cond2 ? 3 : 8;
  6. System.out.println(x + " " + y);
  7. System.out.println(x>y);
  8. }
  9. }
#KBwbPV C++14 28 minutes ago
Success
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <vector>
  4. #include <cmath>
  5.  
  6. static bool abs_compare(int a, int b)
  7. {
  8. return (std::abs(a) < std::abs(b));
  9. }
#1ALOfN Java 56 minutes ago
Success
  1. class Class1 {
  2. static int i=0;
  3. public static void main(String args[]) {
  4. for(int j=0;j<4;j++) {
  5. i += j;
  6. }
  7. System.out.println(i);
  8. }
  9. }
#vWbUdc C# 55 minutes ago
Success
  1. using System;
  2.  
  3. class Test{
  4. static void Main(){
  5. Console.WriteLine("hello");
  6.  
  7. }
  8. }
#WMModo C 56 minutes ago
Compilation error
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. {printf("%d",value(5))}
  5. int value(int x){if(x<1)return x;else{ if(x%2==0) return value(x-1); else return x*value(x-1);}}
  6.  
  7.  
  8.  
#u6Ozdb C 57 minutes ago
Success
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a[3] = {1,2,3};
  5. int b[2] = {4,5};
  6. int c[2] = {6,0};
  7. int d[4];
  8. int * x[4];
  9. x[0] = a;
#Ai2HRN Java 57 minutes ago
Compilation error
  1. Male pattern Baldness, woman Zynev pattern Baldness is also relatively correlated to genetics. unlike with Male pattern Baldness, which frequently begins all through the puberty duration, female pattern baldness usually occurs at some point of a girl's menopausal level. body stressors are the ones guilty for hair loss. it's miles scientifically believed that the stressor reasons principal modifications in a massive part of the hair follicles, shifting them from the anagen boom phase to the catagen then telogen rest phase.http://t...content-available-to-author-only...e.com/zynev-male-enhancement-scam/
  2.  
#lmdlVI Haskell 57 minutes ago
Compilation error
  1. j([])=[]
  2. j(a)=[show $ head a]++j(tail a)
  3.  
  4. f([],b,c,d,e,f)=f
  5. f(a,b,c,d,e,f)=if (elem (take 1 $ a) b)==True then f(drop 1 $ a,b,c++(take 1 $ a),d,e,f)
  6. else if (take 1 $ a)=="+" then f(drop 1 $ a,b,[],d+(read c::Int)*e,1,"+")
  7. else if (take 1 $ a)=="-" then f(drop 1 $ a,b,[],d+(read c::Int)*e,-1,"-")
  8. else f(drop 1 $ a,b,c,d,e,f)
#gAQBeT C 55 minutes ago
Runtime error
  1. #include<stdio.h>
  2. void main()
  3. {
  4. int a,b,i,c1,c2,m[50][50],p,j,n[50][50],d[50],temp;
  5. scanf("%d",&a);
  6. scanf("%d",&b);
  7. for(i=0;i<a;i++)
  8. for(j=0;j<a;j++)
  9. {
#IHKh0O PHP 57 minutes ago
Success
  1. <?php
  2.  
  3. // your code goes here
#29k02X Java 57 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 TestOverload {
  9. public static void print(Float a, double b) {
#98bLiP C 57 minutes ago
Success
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int *a;
  6. *a=50;
  7. printf("%d",*a);
  8. return 0;
  9. }
#OW6GkY Java 57 minutes ago
Success
  1. class Class1 {
  2. static int i=0;
  3. public static void main(String args[]) {
  4. for(int j=0;j<4;j++) {
  5. i += j;
  6. }
  7. System.out.println(i);
  8. }
  9. }
#WVOGsJ Java7 50 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. {
#4n89zG C 57 minutes ago
Compilation error
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. :#include <stdio.h>int main(){printf("%d",value(5))}
  5. int value(int x){if(x<1)return x;else{ if(x%2==0) return value(x-1); else return x*value(x-1);}}
  6.  
  7.  
  8.  
  9.  
#HRhJOv Java 57 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. {
#ACq5p0 C 58 minutes ago
Success
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int a=20;
  6. printf("%d",a);
  7. return 0;
  8. }