Linked Questions

470
votes
846answers
155k 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 ...
602
votes
303answers
224k 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 received....
218
votes
325answers
53k 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 ...
173
votes
339answers
56k views

1, 2, Fizz, 4, Buzz

Introduction In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge. If you wish to see other ...
187
votes
159answers
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
99answers
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 ...
73
votes
236answers
23k 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), ...
80
votes
172answers
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 ...
85
votes
152answers
14k 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 ...
213
votes
62answers
18k 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
138answers
12k 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: ...
60
votes
161answers
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 ...
60
votes
149answers
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: ...
71
votes
114answers
8k views

Make an alphabet searchlight!

Inspired by a bug in a solution to this challenge, your challenge is to produce this exact text: ...

15 30 50 per page
1
2 3 4 5
8