Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3 4 5 6
program hello integer n print *,"Hello World!" read *, n end program hello }
-
1 2 3 4 5 6 7 8 9
program eratos implicit none integer, parameter :: nmax = 1000 integer :: i, j logical :: tab(nmax) tab = .true. tab(1) = .false. do i = 2, int( sqrt(real(nmax)) )
...
-
1 2 3 4 5 6 7 8 9
program eratos implicit none integer, parameter :: nmax = 1000 integer :: i, j logical :: tab(nmax) tab = .true. tab(1) = .false. do i = 2, int( sqrt(real(nmax)) )
...
-
1 2 3 4 5 6 7 8 9
c------------------------------------------------------------------ c Input: c path :The directory that user files live in c pathlen :The length of the character array 'path' c------------------------------------------------------------------ subroutine initialize(path, pathlen) integer pathlen character path(pathlen) c Do nothing
...
-
1 2
USING: math prettyprint ; 40 2 + .
-
1 2 3 4 5 6 7 8 9
program TEST integer ans do read (*,*) ans if (ans.eq.42) stop write (*,*) ans enddo stop end
-
1 2 3 4 5 6 7 8 9
program TEST integer ans do read (*,*) ans if (ans.eq.42) stop write (*,*) ans enddo stop end
-
1 2 3 4 5 6 7 8 9
program quick_sort implicit none real :: x(100) call random_seed() call random_number(x) print '(10f8.5)', qsort(x) stop contains recursive function qsort(a) result(res)
...
-
1 2 3 4 5 6 7 8 9
C Program to get the CC#5 Coordinates Program CC5 C IMPLICIT REAL*8 (e-f,k-o) C CALL Get_Coords (North,East) WRITE (*,1000) North, East 1000 FORMAT ('Cache coordinates: N50',F7.3,', E014',F7.3) C
...
-
1 2 3 4 5 6 7 8 9
C Program to get the CC#5 Coordinates Program CC5 C IMPLICIT REAL*8 (e-f,k-o) C CALL Get_Coords (North,East) WRITE (*,1000) North, East 1000 FORMAT ('Cache coordinates: N50',F7.3,', E014',F7.3) C
...
-
1 2 3 4 5 6 7 8 9
C Program to get the CC#5 Coordinates Program CC5 C IMPLICIT REAL*8 (e-f,k-o) C CALL Get_Coords (North,East) WRITE (*,1000) North, East 1000 FORMAT ('Cache coordinates: N50',F7.3,', E014',F7.3) C
...
-
1 2 3 4 5 6 7 8 9
program catapora_2d use bcat print*,"Digite o lado, a taxa de contaminação e a de imunização" read *, l,a,b open(1,file = "rede.dat") call seed(rnd$timeseed) call CLEARSCREEN($GCLEARSCREEN) allocate(pessoas(l,l),pessoas2(l,l)) pessoas = 0
...
-
1 2 3 4 5 6 7 8 9
program catapora_2d use bcat print*,"Digite o lado, a taxa de contaminação e a de imunização" read *, l,a,b open(1,file = "rede.dat") call seed(rnd$timeseed) call CLEARSCREEN($GCLEARSCREEN) allocate(pessoas(l,l),pessoas2(l,l)) pessoas = 0
...
-
1 2 3 4 5 6 7 8 9
int lim = 0x12345678; int pp = 256; for (int i = 1; (lim-pp) / ((64 + i) + pp) != 0; i++) { if (atan(i - ((i / lim) * lim)) > 1.55) // > ~50 lim = (lim / 50) * 40; int foo = lim; // bar for (int j = 0; j < 0x123456; j++) foo ^= (j >> 3) | (j << 29); // tidy pp &= foo; // in 42-0 if (lim - ((lim / i) * i) == 0) {
...
-
1 2 3 4 5 6 7 8 9
program testcode implicit none integer i real x x=0. do i=1,10 x=x+real(i) enddo
...
-
1 2 3 4 5 6 7 8 9
program testcode implicit none integer i real x c x=0. do i=1,10 x=x+real(i) enddo
...
-
1 2 3 4 5 6 7 8 9
program array integer i, j, n, a(40,40) write (*,*) 'please define size of matrix:' read (*,*) n do 20 j = 1,n do 10 i = 1,n if (i.eq.1.or.j.eq.1) then A(i,j)=1 else
...
-
1 2 3 4 5 6 7 8 9
program array integer i, j, n, a(40,40) write (*,*) 'please define size of matrix:' read (*,*) n do 20 j = 1,n do 10 i = 1,n if (i.eq.1.or.j.eq.1) then A(i,j)=1 else
...
-
1 2 3 4 5 6 7 8 9
program array integer i, j, n, a(40,40) write (*,*) 'please define size of matrix:' n=5 do 20 j = 1,n do 10 i = 1,n if (i.eq.1.or.j.eq.1) then A(i,j)=1 else
...
-
1 2 3 4 5 6 7 8 9
program array integer i, j, n, a(40,40) write (*,*) 'please define size of matrix:' read (*,*) n do 20 j = 1,n do 10 i = 1,n if (i.eq.1.or.j.eq.1) then A(i,j)=1 else
...
-
1 2 3 4 5 6 7 8 9
* test program program array integer i, j, n, a(40,40) write (*,*) 'please define size of matrix:' read (*,*) n do 20 j = 1,n do 10 i = 1,n if (i.eq.1.or.j.eq.1) then
...
-
1 2 3 4 5 6 7 8 9
int lim = 0x12345678; int pp = 256; for (int i = 1; (lim-pp) / ((64 + i) + pp) != 0; i++) { if (atan(i - ((i / lim) * lim)) > 1.55) // > ~50 lim = (lim / 50) * 40; int foo = lim; // bar for (int j = 0; j < 0x123456; j++) foo ^= (j >> 3) | (j << 29); // tidy pp &= foo; // in 42-0 if (lim - ((lim / i) * i) == 0) {
...
-
1 2 3 4 5 6 7 8
(define (margreteborg row col) (cond ((< row col) #f) ((or (= 0 col) (= row col)) 1) (else (+ (margreteborg (- row 1) col) (margreteborg (- row 1) (- col 1)))))) N (margreteborg 2 2)+(margreteborg 3 2)+(margreteborg 11 2) (margreteborg 6 3)+(margreteborg 3 2) .(margreteborg 12 5)- (margreteborg 5 3)
...
-
1 2 3 4 5 6 7 8 9
program circle real r, area, pi parameter (pi = 3.14159) write (*,*) 'Give radius r:' read (*,*) r area = pi*r*r write (*,*) 'Area = ', area stop end
...
-
1 2 3 4 5 6 7 8 9
program circle real r, area, pi parameter (pi = 3.14159) c This program reads a real number r and prints c the area of a circle with radius r. write (*,*) 'Give radius r:' read (*,*) r area = pi*r*r write (*,*) 'Area = ', area
...
-
1 2 3 4 5 6 7 8 9
program circle real r, area, pi parameter (pi = 3.14159) c This program reads a real number r and prints c the area of a circle with radius r. write (*,*) 'Give radius r:' read (*,*) r area = pi*r*r write (*,*) 'Area = ', area
...
-
1 2 3 4 5 6 7 8
PROGRAM INVERT IMPLICIT NONE REAL :: Value, Inverse PRINT "Type in a value to invert" READ Value Inverse = 1.0/Value PRINT *, "Value", Value, " Inverse", Inverse END PROGRAM INVERT
-
1 2 3 4 5 6 7 8
PROGRAM INVERT IMPLICIT NONE REAL :: Value, Inverse PRINT *, "Type in a value to invert" READ *, Value Inverse = 1.0/Value PRINT *, "Value", Value, " Inverse", Inverse END PROGRAM INVERT
-
1 2 3 4 5 6 7 8
PROGRAM INVERT IMPLICIT NONE REAL :: Value, Inverse PRINT *, "Type in a value to invert" READ *, Value Inverse = 1.0/Value PRINT *, "Value", Value, " Inverse", Inverse END PROGRAM INVERT
-
1 2 3 4 5 6 7 8
PROGRAM INVERT IMPLICIT NONE REAL :: Value, Inverse PRINT *, "Type in a value to invert" READ *, Value Inverse = 1.0/Value PRINT *, "Value", Value, " Inverse", Inverse END PROGRAM INVERT


