Aug 24, 2007

Display Hello World without semicolon

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 World\n" ) )
{
}
}

2 comments:

Anonymous said...

class Program
{
static void Main(string[] args)
{
while (args == typeof(System.Console).InvokeMember("WriteLine",
(System.Reflection.BindingFlags)280, null, null,
new object[] { "Hello, world!" }))
{ }
}
}

will do the trick too

Anonymous said...

It is perfect time to make a few plans for [url=http://www.oksunglassesaushop.com]oakley sunglasses online[/url] the long run and it is time to be happy. I have read this put up and if I may just I want to suggest you few fascinating issues or tips. Maybe you could write subsequent articles regarding this article. [url=http://www.oksunglassesaushop.com]cheap oakley sunglasses[/url] , I desire to read more issues about it!