Programing Puzzles
Wyverex
wyverex.cypher at gmail.com
Wed Aug 6 14:50:56 PDT 2008
just some fun little programming puzzles I found around online...
Write a "Hello World" program in 'C' without using a semicolon.
(Note: #include in C doesn't need a semicolon but import does)
Problem #1 Write a "Hello World" program in D with only a semicolon on
import statement.
Problem #2 Test if an int is even or odd without looping or if statement
(Cant use: do, while, for, foreach, if).
Problem #3 Write a program without using any loop (if, for, while etc)
to print numbers from 1 to 100 and 100 to 1;
Problem #4 Find if the given number is a power of 2.
Post Solutions to this root, comments to someones solution in that thread.
More information about the Digitalmars-d-learn
mailing list