using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Output do{.. break;} while() result");
int i = 1;
do
{
if ((i % 2) == 0)
break;
Console.WriteLine("{0}",i++);
}
while(i<=10);
//break, ;
Console.WriteLine("Output do{.. continue;} while() result");
int j= 1;
do
{
if ((j++ % 2) == 0)
Console.WriteLine("{0}", j);
continue;
}
while (j <= 10);
//continue, ; ;
Console.WriteLine("Output do{.. break;} while(true) result");
int k = 1;
do
{
if ((k++ % 2) == 0)
Console.WriteLine("{0}", k);
break;
}
while (true);
// , break ;
Console.WriteLine("Output do{.. continue;} while(true) result");
int z= 1;
do
{
if ((z % 2) == 0)
continue;
Console.WriteLine("{0}", z++);
}
while (true);
// ,continue, ;
Console.ReadLine();
}
}
}