Linked Questions

454
votes
806answers
145k 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 ...
592
votes
291answers
220k views

Produce the number 2014 without any numbers in your source code

Note to challenge writers as per meta consensus: This question was well-received when it was posted, but challenges like this, asking answerers to Do X without using Y are likely to be poorly ...
214
votes
309answers
51k 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 ...
186
votes
156answers
18k 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 ...
170
votes
98answers
39k views

Programming Languages Through The Years

In this challenge, users will take turns completeing three fairly simple coding tasks in programming languages that are allowed to be progressively older. The first answer must use a programming ...
69
votes
230answers
22k views

Is this even or odd?

Note: There is not been a vanilla parity test challenge yet (There is a C/C++ one but that disallows the ability to use languages other than C/C++, and other non-vanilla ones are mostly closed too), ...
74
votes
158answers
8k views

Output the sign

Given a number N, output the sign of N: If N is positive, output 1 If N is negative, output -1 If N is 0, output 0 N will be an integer within the representable range of integers in your chosen ...
82
votes
143answers
13k views

Print a Tabula Recta!

Print a Tabula Recta! The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere ...
205
votes
59answers
17k views

No A, just CAPS LOCK

What happens when the CapsLock key on your keyboard doesn't have a notch in it? "This hPPENS." The goal of this program is to consistently emulate keyboard misses where each A press is replaced with ...
86
votes
135answers
11k views

Determine whether strings are anagrams

Challenge Given two strings, work out if they both have exactly the same characters in them. Example Input word, wrdo This returns true because they are the ...
71
votes
148answers
17k views

The alphabet in programming languages

Our task is to, for each letter of the (English) alphabet, write a program that prints the alphabet, in a language whose name starts with that letter. Input: none Output: ...
59
votes
156answers
8k views

Output your Score!

Challenge: The concept is simple enough: write a full program to output its own code golf score! Output should only be the byte count of your program and a trailing ...
57
votes
139answers
9k views

Print all integers

Write a program or function which will provably print all integers exactly once given infinite time and memory. Possible outputs could be: ...
69
votes
106answers
8k views

Make an alphabet searchlight!

Inspired by a bug in a solution to this challenge, your challenge is to produce this exact text: ...
80
votes
76answers
15k views

It was just a bug

Inspired by the bugged output in @Carcigenicate's Clojure answer for the Print this diamond challenge. Print this exact text: ...

15 30 50 per page
1
2 3 4 5
8