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

#FCFFgJ C++11 11 seconds ago
Success
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <cstring>
  4. #include <cmath>
  5. #include <algorithm>
  6. #define INF 0x7f7f7f7f
  7. using namespace std;
  8. struct Box
  9. {
#tOUhcQ C++11 49 seconds ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class C
  5. {
  6. public:
  7. C() { std::cout << "create\n"; }
  8. ~C() { std::cout << "destroy\n"; }
  9. };
#cDaSHU C++11 2 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string str;
  7. getline(cin,str);
  8. cout<<str;
  9. return 0;
#vQPpIN C++11 3 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout <<"\%";
  6. return 0;
  7. }
#BJwBGq C++11 51 seconds ago
Success
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. #include <map>
  5. #include <cstring>
  6.  
  7. using namespace std;
  8.  
  9. const int maxN = 600000;
#2pAiE1 C++11 4 minutes ago
Success
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. int main() {
  5. std::vector<bool> v = { true, true, true };
  6. std::cout << (*(v.end() - 1)) << std::endl;
  7. }
#1Fm30s C++11 5 minutes ago
Success
  1. #include<iostream>
  2. #include<cstdio>
  3. #include<algorithm>
  4. using namespace std;
  5. int main()
  6. {
  7. int i,j,length,n,arr[100005],p,l,m,k;
  8. while(scanf("%d %d",&i,&j)==2)
  9. {
#CXKEN3 C++11 3 minutes ago
Success
  1. #include <cstdio>
  2. #include <vector>
  3.  
  4. int main() {
  5. char a1[100][100];
  6. bool b1[100][100];
  7. int a,b;
  8. scanf("%d %d", &a, &b);
  9. for (int baris = 0;baris<a;baris++){
#VJKrQs C++11 7 minutes ago
Success
  1. #include<iostream>
  2. //#include<cstdio>
  3. #include<algorithm>
  4. using namespace std;
  5. int main()
  6. {
  7. int i,j,length,n,arr[100005],p,l,m,k;
  8. // while(scanf("%d %d",&i,&j)==2)
  9. // {
#kcuepH C++11 8 minutes ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3. /*
  4.  
  5.   This is program for Encryption and Decryption
  6.   This program uses the Simple Data Encryption Standard (SDES) Algorithm.
  7.   This Algo takes 8-bits of plaintext at a time and produces 8-bits of ciphertext.
  8.   It uses 10-bits of key for Encryption and Decryption.
  9.  
#E0IZSl C++11 8 minutes ago
Compilation error
  1. main()
  2. #include <stdio.h>
  3. #include <conio.h>
  4. #include <math.h>
  5. {
  6. float a, b, s;
  7. printf("VVedite 2 chelih chisla a, b \n ");
  8. scanf ("%f%f", %a, %b);
  9. s=(fabs(pow(a,2))-b)/(sqrt(2*pow(b,2))+1));
#Aywowt C++11 4 seconds ago
Success
  1. #include <iostream>
  2. #include<cstring>
  3.  
  4. using namespace std;
  5. char fun(char str[])
  6. {
  7. static int a[256];
  8. char max;
  9. for(int i=0;*(str+i);i++)
#x5n7SW C++11 2 minutes ago
Success
  1. #include <cmath>
  2. #include <cstddef>
  3. #include <iostream>
  4.  
  5. constexpr size_t base64Size(size_t rawSize) {
  6. return static_cast<size_t>(ceil(double(rawSize)/3*4));
  7. }
  8.  
  9. template<typename T>
#CsMzvA C++11 9 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int sum = 0;
  6. for(int i = 1; i<=10; ++i){
  7. sum += i;
  8. }
  9. cout << sum;
#4yK2yP C++11 10 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string str="a";
  6. cout << str.length();
  7. return 0;
  8. }
#LGh6aK C++11 11 minutes ago
Success
  1. #include <cstdint>
  2. #include <cstdio>
  3.  
  4. using std::printf;
  5. union f
  6. {
  7. double d;
  8. uint64_t u;
  9. };
#aorqk2 C++11 14 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int sum = 0;
  6. for(int i = -100; i <= 100; ++i){
  7. sum += i;
  8.  
  9. }
#MN2WEs C++11 13 minutes ago
Success
  1. #include <iostream>
  2.  
  3. #include <math.h>
  4. #define eps 0.01
  5. using namespace std;
  6.  
  7. float f( double x)
  8. {
  9. return pow(x,3)-12*x+9;
#eyXXda C++11 21 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Person
  5. {
  6. Person(int) {}
  7. };
  8.  
  9. int main()
#csf646 C++11 15 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Bar {};
  5. template<typename T>
  6. struct Foo {
  7.  
  8. template<typename T2>
  9. Foo(const T2& f) {
#0ktsw3 C++11 20 minutes ago
Runtime error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. char *name[] = { "Illegal month", "Jan", "Feb", "Mar" };
  7. cout << name[2][1] << endl;
  8. *name[2] = 'Apr';
  9. cout << name[2][1] << endl;
#Kw3OPw C++11 14 minutes ago
Success
  1. #include <iostream>
  2. #include <limits>
  3.  
  4. int main() {
  5. typedef int size_type;
  6. size_type size, max, fixed_max;
  7. std::size_t malloc_input;
  8.  
  9. std::cout << "test case 1:\n";
#JEjC4V C++11 24 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int count = 0, n;
  6. cout << "Nhập n: " << endl;
  7.  
  8. cin >> n;
  9. for(int i = 1; i <= n; i++)
#4KfiQE C++11 24 minutes ago
Success
  1. //Clase del 1 de septiembre
  2.  
  3. #include <iostream>
  4. #include <algorithm>
  5. #include <vector>
  6. #include <assert.h>
  7.  
  8. using namespace std;
#O0X29F C++11 25 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. return 0;
  7. }
#Wrm5sW C++11 25 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int count, n = 13;
  6. //cout << "Nhập n: " << endl;
  7.  
  8. //cin >> n;
  9. for(int i = 1; i <= n; i++)
#IDlrOP C++11 25 minutes ago
Success
  1. //Carlos gutierrez
  2. //Andres Collazos
  3.  
  4. #include <iostream>
  5. #include <math.h>
  6.  
  7. typedef long long int64;
  8.  
  9. using namespace std;
#LtOyKw C++11 26 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int count, n;
  6. cout << "Nhập n: " << endl;
  7.  
  8. cin >> n;
  9. for(int i = 1; i <= n; i++)
#anMfUH C++11 26 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int gcd(int m, int n)
  5. {
  6. int shiftCount = 0;
  7.  
  8. while(m > 0 && n > 0)
  9. {
#5eVLcK C++11 28 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdio>
  4.  
  5. using namespace std;
  6.  
  7. class Persona {
  8. string nombre;
  9. int birthYear;