Posts Tagged ‘C#’

Display Hello World without semicolon

March 4, 2008

C# version

namespace WriteHelloWorld
{
class Program
{
static void Main(string[] args)
{

while (!”0″.Equals(System.Console.Title = “Hello world”).Equals(System.Console.ReadLine()))
{
}

}
}
}

C++ version
#include “stdio.h”

int main()
{
while( !printf( “Hello Worldn” ) )
{
}
}

Advertisements