Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple programming practice (Fizz Buzz, Print Primes) [closed]

I want to practice my skills away from a keyboard (i.e. pen and paper) and I'm after simple practice questions like Fizz Buzz, Print the first N primes.

What are your favourite simple programming questions?

like image 955
Corin Blaikie Avatar asked Aug 27 '08 12:08

Corin Blaikie


2 Answers

I've been working on http://projecteuler.net/

like image 129
Nick Avatar answered Nov 16 '22 06:11

Nick


Problem: Insert + or - sign anywhere between the digits 123456789 in such a way that the expression evaluates to 100. The condition is that the order of the digits must not be changed.

e.g.: 1 + 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100

Programming Problem: Write a program in your favorite language which outputs all possible solutions of the above problem.

like image 37
Niyaz Avatar answered Nov 16 '22 08:11

Niyaz