msgbartop
Arama Motoru Optimizasyonu , Scriptler ,Genel Bilgiler ve SEO Makaleleri
msgbarbottom

Yazıyı ters çeviren csharp console aplication 27 11 09

string yazi = “BECERİ”;

char[] ters = new char[yazi.Length];

for (int i = 0; i < yazi.Length / 2; ++i)

{

ters[i] = yazi[yazi.Length - i - 1];

ters[yazi.Length - i - 1] = yazi[i];

}

if (yazi.Length % 2 == 1)

ters[yazi.Length / 2] = yazi[yazi.Length / 2];

Console.WriteLine(ters);

Etiketler: ,