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
intuitive understanding of the area under the curve - again
Wireless LAN , Larger Scale
SQL Server Database Stuck in Single User mode
What causes error "0x80070015" when connecting to bluetooth device in window 7?
objectdatasource error typename cannot be found
Unix filler
Logical Drive Corrupted. Server repair says its not formatted
integration used to measure population increase
Computer in VMWare has black screen with _ symbol
ESX 4.0 Does not detect onboard NIC