🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Burak HABER / C# / DersFor(ramazanınÖğretileri)

1-) C# - DersFor(ramazanınÖğretileri)

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

 

namespace DersFor

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            /*int sayi = Convert.ToInt32(textBox1.Text);//int bir sayının %2 yüzde ikisini alıp tekmidir çifmidir olduğunu yazan kod.

            int kalan = sayi % 2;

            if (kalan == 1)

            {

                Console.WriteLine("tektir");

            }

            else

            {

                Console.WriteLine("çiftir");

            }*/

 

            /*string a = textBox1.Text;// En sondaki karakteri basar.

            string b = a[a.Length - 1].ToString();

 

            Console.WriteLine(b);*/

 

 

            /*string b = textBox1.Text;// ne yazılırsa onu yazar.

            string c = b[0].ToString();

 

            Console.WriteLine(b);*/

 

            /*string sayi = textBox1.Text;//bir sayının tek mi çiftmi oldugunu konsola yazdırır

            string a = sayi[sayi.Length - 1].ToString();

 

            if (a == "1" || a == "3" || a == "5" || a == "7" || a == "9")

            {

                Console.WriteLine("tektir");

            }

            else

            {

                Console.WriteLine("çiftir");

            }*/

 

 

            /*string a = textBox1.Text;// baştan yazma Alt alta

            int b = a.Length;

 

            for (int i = 0; i < b; i++)

            {

                Console.WriteLine(a[i]);

            }*/

 

 

            /*string a = textBox1.Text;// tersten yazma Alt alta

            int b = a.Length - 1;

 

            for (int i = b; i > -1; i--)

            {

                Console.WriteLine(a[i]);

 

            }*/

        }

    }

}

 

 2021 Mart 11 Perşembe
 381