Linked Questions

383
votes
722answers
111k views

“Hello, World!”

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...
489
votes
225answers
106k views

Showcase of Languages

Notes This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do ...
181
votes
297answers
38k views

Golf you a quine for great good!

Using your language of choice, golf a quine. A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. No cheating -- that means ...
182
votes
272answers
41k views

Is this number a prime?

Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in ...
136
votes
338answers
24k views

Implement a Truth-Machine

A truth-machine (credits goes to this guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does: Gets a ...
221
votes
180answers
34k views

Evolution of “Hello World!”

This contest is officially over, the winner is jimmy23013. Congratulations! The challenge is to make a program that prints Hello World! to stdout. The catch is ...
180
votes
202answers
38k views

The Programming Language Quiz

Congratulations to Dennis who won both the cops' and the robbers' challenge! Calvin's Hobbies has already delivered on his promise and wrote this challenge for Dennis for winning the robbers' ...
138
votes
240answers
26k views

Unscramble the Source Code

Note: This challenge is now closed to new cop submissions. This is to ensure that no one can post submissions that only remain uncracked because there aren't enough robbers interested in the challenge ...
174
votes
137answers
16k views

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

I think the question as above is clear, but just in case: Write a full program (not just a function) which prints a positive base 10 integer, optionally followed by a single newline. Qualifying ...
107
votes
211answers
22k views

Fibonacci function or sequence

The Fibonacci sequence is a sequence of numbers, where every number in the sequence is the sum of the two numbers preceding it. The first two numbers in the sequence are both 1. Here are the first ...
114
votes
176answers
28k views

Sing Happy Birthday to your favourite programming language

Your favourite programming language has just had a birthday. Be nice and sing it the Happy Birthday song. Of course you should accomplish this by writing a program in that language. The program takes ...
78
votes
248answers
15k views

Simple cat program

One of the most common standard tasks (especially when showcasing esoteric programming languages) is to implement a "cat program": read all of STDIN and print it to STDOUT. While this is named after ...
72
votes
227answers
13k views

Create output twice the length of the code

The Challenge Write a complete program that writes twice as many bytes to standard output as the length of the program. Rules The program must write ASCII characters to the standard output. The ...
60
votes
210answers
8k views

The Mystery String Printer (Cops)

The robbers thread can be found here: The Mystery String Printer (Robbers) Your challenge Write a program, function, or REPL script that prints a string to STDOUT. The robbers will try to create a ...
59
votes
158answers
17k views

The Letter A without A

Your task is to display the letter "A" alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of ...

15 30 50 per page