c# da(ifadeyi tersini cevirip isze parametre olrak gönderen program by murat335)

murat335

New member
yazdıgınız her ifadeyi terse cevirip isze gönderirir yazan murat335
PHP:
using System;
using System.Collections.Generic;
using System.Text;

namespace terscevir
{
    class hesap
    {
        public static void degis(ref int x, ref int y)
        {
            x = 45;
            y = 86;
        
        }

        public static string cevir(string gelen)
        {   string sonuc;
        for (int i = gelen.Length - 1; i > 0; --i )
            {
                sonuc ++= gelen.Substring(i,1);
                return sonuc;
                
            }
        
        }
    }
    class Program
    {  
        static void Main(string[] args)
        {
            int a = 5;
            int b = 19;
            hesap.degis(ref a, ref b);
            Console.WriteLine(hesap.cevir("merhaba"));





        }
    }
}
 

HTML

Üst