C# Module

Let’s introduce the C# Mod method, one of the mathematical functions that we occasionally need when programming.
private void btnBaslat_Click(object sender, EventArgs e)
{
Random salla = new Random(); // Random object that generates an ordinary number.
int sayi = salla.Next(1, 100); //Generate numbers between 1-100
if (sayi % 2 == 0) //Returns true if the number is divisible by 2, false if it is not.
MessageBox.Show(sayi.ToString() + " sayisi cift");
else MessageBox.Show(sayi.ToString() + " Sayisi tek");
}
C#MAKE A COMMENT
COMMENTS - 0 COMMENTS