Microsoft
Software
Hardware
Network
Question : C# the differences between Do While Loop and For
I have the following code, which basically do the same thing. However, they have different output layout. Can anybody help me to understand why the output layout is different? one is horizontal, one is vertical .
int counter = 1; // initialize counter
do
{
Console.Write("{0} ", counter);
++counter;
} while (counter <= 10); // end do...while
Console.WriteLine(); // outputs a newline
for (int i = 0; i < 11; i++)
{
Console.WriteLine(i);
}
Attachments:
doWhile-For.JPG
(21 KB)
(File Type Details)
doWhile&for
Answer : C# the differences between Do While Loop and For
one is write and the other is write line
Random Solutions
Oracle qry on system tables
Able to access the internet but unable to receive microsoft updates?
explanation of httpcontext needed
Exchange 2003 on SBS 2003 Active Sync and Blackberry/iPhone Configuration Help Needed
DC keeps rebooting- 2003 server!
I need your advice in this class php
Batch File: Remove spaces in variable
how to install an IPhone app with UUID
Question about Exchange 2010 mailbox move.
SBS 2008 - STOP c00002e2