Sintaks:
continue;
Contoh dalam alur do while:
Contoh Code:
using System;
namespace DoWhileLoop
{
class Program
{
static void Main(string[] args)
{
int a = 10;
/* eksekusi do while loop */
do
{
if (a == 15)
{
/* skip iterasi */
a = a + 1;
continue;
}
Console.WriteLine("nilai a adalah: {0}", a);
a++;
} while (a < 20);
Console.ReadLine();
}
}
}
Runtime:
Click here if you like this article.
0 Comments