for the single line command challenge:
Console.WriteLine(" 1\n 121\n 12321\n 1234321\n123454321\n 1234321\n 12321\n 121\n 1");
Of course that violates the "using a loop" constraint :)
for the single line command challenge:
Console.WriteLine(" 1\n 121\n 12321\n 1234321\n123454321\n 1234321\n 12321\n 121\n 1");
Of course that violates the "using a loop" constraint :)
Of course you could get a single line instruction and use a loop by preceeding the above with
for (; 1 == 2; ) ;
You can make it a single line in a loop with:
for (int i=0; i < 1; i++)
Show off
What was it my professor once said, it's now how efficent you write the code, it's how easy it is to maintain ... LOL
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.