Linked Questions

81
votes
266answers
21k views

Print a 10 by 10 grid of asterisks

Background This is a standard textbook example to demonstrate for loops. This is one of the first programs I learnt when I started learning programming ~10 years ago. Task You are to print this ...
65
votes
55answers
12k views

Hare Krishna Hare Krishna Krishna Krishna Hare Hare

Recently, I've seen Hare Krishna people with their mantra on the emblem and I've found it may be quite interesting to code golf. The challenge Write the Hare Krishna mantra, i.e.: ...
104
votes
39answers
11k views

A simple TCP server

Write a program or function that listens for incoming TCP traffic on port N. It offers a simple service: it calculates sum of IP address fields of incoming connection and returns. Program or function ...
46
votes
62answers
7k views

Pointers, pointers, pointers!

Introduction In the error outputs of some languages such as Java, a pointer is shown to give the programmer an idea of exactly where the error went wrong. Take this example on Ideone: ...
65
votes
50answers
10k views

My daughter's alphabet

The other day we were writing sentences with my daughter with a fridge magnet letter. While we were able to make some(I love cat), we didn't have enough letters to ...
46
votes
50answers
9k views

The Curious Case of Steve Ballmer

Steve Ballmer is the ex-CEO of Microsoft, and in a recent article, claimed that he "still does not know what he did wrong with mobile". As CodeProject's newsletter pointed out, "That article's title ...
31
votes
61answers
4k views

Insist on an answer

At runtime, keep prompting for a line of input until the user inputs something (other than an empty newline), i.e. does not just press Enter or OK. Output or result is neither required nor prohibited. ...
38
votes
51answers
6k views

Don't give me five!

Question : You will be given the starting and ending integers of a sequence and should return the number of integers within it which do not contain the digit 5. ...
65
votes
26answers
15k views

xkcd-Style Page Numbering

Randall Munroe's book "xkcd, volume 0" uses a rather odd number system for the page numbers. The first few page numbers are ...
30
votes
42answers
2k views

Implement “tac”: Print lines from a file in reverse

Between the kitten question and seeing this question at U&L about some sed magic, how about implementing tac? Objective ...
35
votes
27answers
11k views

Java is to JavaScript as Car is to Carpet

Title stolen inspired by Greg Hewgill's answer to What's the difference between JavaScript and Java? Introduction Java and JavaScript are commonly used languages among programmers, and are currently ...
42
votes
30answers
3k views

Reverse the consonants

The program should take a string as input and reverse the consonants in it, while keeping the order of vowels. All the letters will be lowercase, so you don't have to worry about casing. Examples ...
26
votes
45answers
1k views

Diagonal Alphabet To the Input

Inspired by this post. For those marking this question as a duplicate I urge you to actually read the question to see that mine is a modification of the one linked. The one linked does not ask for an ...
28
votes
30answers
3k views

Person of Interest

Background Person of Interest is a crime drama on CBS, and my favorite TV show, as of late. The show is about a man named Harold Finch, a billionaire programmer, and his partner John Reese, a ...
49
votes
13answers
5k views

Yarr! A map to the hidden treasure!

Introduction "Yarr!! We had a laddie who called himself a "programmer" make a map t' our hidden treasure! But 'tis written wit' weird numbers 'n letters! "E5, N2, E3"... what does it even mean? ...

15 30 50 per page