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

#BXBCdH C++11 1 minute ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class sample
  5. {
  6. int a,b;
  7. public:
  8. void setvalue()
  9. { a=25; b=40; }
#6daq1h C++11 2 minutes ago
Success
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int w=7;
  9. int h=(w+1)/2;
#9sqfws C++11 3 minutes ago
Success
  1. #include <iostream>
  2. #include <type_traits>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. template <typename ...>
  7. struct voider { using type = void; };
  8.  
  9. template <typename ... Types>
#s9QL07 C++11 10 minutes ago
Runtime error
  1. /*
  2. ID: terry_y1
  3. LANG: C++
  4. TASK: gift1
  5. */
  6. #include<iostream>
  7. #include<cstdio>
  8. #include<fstream>
  9. using namespace std;
#W00iLt C++11 5 minutes ago
Success
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int T;
  6. cin>>T;
  7. while(T)
  8. {
  9. int N;
#MIA0sY C++11 14 minutes ago
Success
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int T;
  6. while(T)
  7. {
  8. int N;
  9. cin>>N;
#PCGt6o C++11 15 minutes ago
Time limit exceeded
  1. #include<iostream>
  2. #include<stdio.h>
  3. #include<vector>
  4. using namespace std;
  5. vector<int>v1;
  6.  
  7. int main()
  8. {
  9. long long t;
#U5IDQ2 C++11 22 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3. int a[101][101];
  4. int R,C,m,n,water,q,r,count,even,odd;
  5.  
  6. int count_k(int x,int y)
  7. {
  8. count=0;
  9. if(m==n )
#dXSJyq C++11 22 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main ( )
  6. {
  7. int i, j;
  8. double d;
  9. string s; // C++中新增 string 类型
#vH11xP C++11 22 minutes ago
Compilation error
  1. #include<iostream.h>
  2. #include<conio.h>
  3.  
  4. void main()
  5. {
  6. clrscr();
  7. int x,y,z;
  8. x=y=z=0;
  9. char ch1[100],ch2,ch3,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11;
#IDxFnV C++11 22 minutes ago
Success
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. fstream datafile("inventory.txt", ios::in | ios::out);
  6.  
  7. int main() {
  8. // your code goes here
  9. return 0;
#tqRIU8 C++11 22 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main ( )
  6. {
  7. int i, j;
  8. double d;
  9. string s; // C++中新增 string 类型
#z9hG9e C++11 24 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main ( )
  6. {
  7. int i, j;
  8. double d;
  9. string s; // C++中新增 string 类型
#FZD0HQ C++11 28 minutes ago
Runtime error
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. #include <cstdlib>
  5. using namespace std;
  6.  
  7. void Roberto_Bolano ( ifstream& infile1,string file1);
  8.  
  9. int main () {
#aBy0Ty C++11 35 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. return 0;
  7. }
#XGrD8o C++11 4 minutes ago
Success
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. typedef unsigned long ulong;
  5.  
  6. ulong rotr(unsigned long n, int s){
  7. return (n >> s) | (n << (32 - s));
  8. }
#dUT09m C++11 33 minutes ago
Success
  1. # include <iostream>
  2. # include <vector>
  3. # define pb push_back
  4. using namespace std;
  5.  
  6. vector < vector<int> > graph(10001,vector<int>());
  7. int visited[10001];
  8. int total[10001];
  9. int max1,index;
#ETDaVa C++11 40 minutes ago
Runtime error
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n, i, j, m;
  8. float t,b;
  9. int s, max;
#Y5Tbxa C++11 45 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int age;
  6. cout << "enter ur age" << endl;
  7. cin >> age;
  8. switch (age){
  9. case 13:
#5Yn1m6 C++11 36 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. cout<<"0";
  7. return 0;
  8. }
#qgAcRU C++11 27 minutes ago
Success
  1. #include <stdio.h>
  2. #include <iostream>
  3. #include <queue>
  4. #include <vector>
  5. #include <algorithm>
  6. #include <map>
  7. #include <set>
  8. #include <deque>
  9. #include <stdio.h>
#f4Gzfa C++11 5 minutes ago
Success
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int reverse(int n )
  5. {
  6. int sum = 0;
  7. while (n != 0)
  8. {
  9. sum *=10;
#oUfzkQ C++11 13 minutes ago
Success
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. int main() {
  5. long int sum,j,n,k,arr[100001],diff,counter,temp_arr[10000];
  6. cin>>n;
  7. cin>>k;
  8. for(long int i=0;i<n;i++){
  9. cin>>arr[i];
#Uh8r8E C++11 52 minutes ago
Success
  1. #include <iostream>
  2. #include <time.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. struct tm tm;
  7. struct tm* tmp = &tm;
  8.  
  9. strptime("2014-01-02 06:00:00 EST", "%Y-%m-%d %T %Z", &tm);
#mek4EA C++11 56 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. string Richestperson[4][5]= {
  6. {"Bandish Shah", "Bill Gates", "Warren Buffet", "Carloss Slim", "Vlandimir Putin"},
  7. {"Amancio Gaona", "Larry Ellison", "Charles Koch", "David Koch", "Ingvar Kamprad"},
  8. {"Christy Walton", "Robson Walton", "Alice Walton", "Michael Bloomberg", "Bernard Arnault"},
  9. {"Mark Zuckerberg", "Stefan Persson", "King of Thiland", "Prince Alsaud", "Larry Page"}
#ft9sU7 C++11 1 hour ago
Compilation error
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <math.h>
  4. main()
  5. {
  6. int i,n;
  7. float s;
  8. printf("Nhap vao n");
  9. scanf("%d",&n);
#OXentB C++11 1 hour ago
Success
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. string places[2][5] = {
  6. {"Ahmedabad" , "Delhi" , "Mumbai" , "Banglor" , "Hariyana"},
  7. {"Newyork" , "Cleveland" , "Seattel" , "New-mexico" , "Silliconvally"}
  8. };
  9. for(int i=0; i<2; i++) {
#eEXOmV C++11 1 hour ago
Compilation error
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main(){
  6. int n;
  7. cin >> n;
  8. cin.ignore();
  9. while(n--){
#yHap0R C++11 1 hour ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. return 0;
  7. }
#lyTRcC C++11 1 hour ago
Success
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. string places[2][5] = {
  6. {"Ahmedabad" , "Delhi" , "Mumbai" , "Banglor" , "Hariyana"},
  7. {"Newyork" , "Cleveland" , "Seattel" , "New-mexico" , "Sillicon"}
  8. };
  9. for(int i=0; i<2; i++) {