
C# Programlama – While Döngüsü
Ocak 2, 2022
C# Programlama – Continue Keyword
Ocak 2, 2022C# Programlama - Do While Döngüsü
Do While Döngüsü Örnekleri:
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
//*******************DoWhile*********************
var passWordOne = "Mm221100..";
do
{
Console.WriteLine("What is your password? ");
}
while (passWordOne != Console.ReadLine());
Console.WriteLine("Tebrikler şifre doğru.");
Console.ReadKey();
//***********************************************
int x = 0;
do
{
Console.WriteLine(x);
x++;
} while (x < 10);
//***********************************************
int y = 0;
int z = 0;
do
{
Console.WriteLine(y + z);
y++;
z++;
}
while (y + z < 21);
Console.ReadKey();
}
}
}