Cevap Geçmişi
«« Soruya geri dön
16.03.20 18:38
Büyük sayılarla çalışmak için  BigInteger  yapısını kullanırız. BigInteger yapısı  System.Numerics   isim alanında var. Bu isim alanını kullanabilmek için çözüm gezgininde projenizin  References  ağacını sağ tıklayın, sırasıyla " Add references / Assemblies " seçeneklerini tıklayın. Arama kutusuna  Numerics  yazarak  System.Numerics  'i bulun ve ekleyin. Örnek: using System.Numerics;
					
public class Program
{
	public static void Main()
	{
		BigInteger big1 = Factorial(9302);
		System.Console.WriteLine(big1);
	}
	
	private static System.Numerics.BigInteger Factorial(System.Numerics.BigInteger n) {
		BigInteger results = new BigInteger(1);
		
		for(int i=1; i<=n; i++)
			results *= i;
		
		return results;
	}
	
}
 BigInteger  ile OBEB vs. de hesaplanabiliyor. Komple bir başvuru için: https://docs.microsoft.com/tr-tr/dotnet/api/system.numerics.biginteger?view=netframework-4.8
Ekleyen: cevapsitesi
Değiştiren: cevapsitesi
Cevap olarak seçen: cevapsitesi
10.03.20 02:18
Büyük sayılarla çalışmak için  BigInteger  yapısını kullanırız. BigInteger yapısı  System.Numerics   isim alanında var. Bu isim alanını kullanabilmek için çözüm gezgininde projenizin  References  ağacını sağ tıklayın, sırasıyla " Add references / Assemblies " seçeneklerini tıklayın. Arama kutusuna  Numerics  yazarak  System.Numerics  'i bulun ve ekleyin. Örnek: using System.Numerics;
					
public class Program
{
	public static void Main()
	{
		System.Numerics.BigInteger big1 = Factorial(9302);
		System.Console.WriteLine(big1);
	}
	
	private static System.Numerics.BigInteger Factorial(System.Numerics.BigInteger n) {
		System.Numerics.BigInteger results =
			new BigInteger(1);
		
		for(int i=1; i<=n; i++)
			results *= i;
		
		return results;
	}
	
}
 BigInteger  ile OBEB vs. de hesaplanabiliyor. Komple bir başvuru için: https://docs.microsoft.com/tr-tr/dotnet/api/system.numerics.biginteger?view=netframework-4.8
Ekleyen: cevapsitesi
Değiştiren: cevapsitesi
Cevap olarak seçen: cevapsitesi
10.03.20 02:13
Büyük sayılarla çalışmak için  BigInteger  yapısını kullanırız. BigInteger yapısı  System.Numerics   isim alanında var. Bu isim alanını kullanabilmek için çözüm gezgininde projenizin  References  ağacını sağ tıklayın, sırasıyla " Add references / Assemblies " seçeneklerini tıklayın. Arama kutusuna  Numerics  yazarak  System.Numerics  'i bulun ve ekleyin. Örnek: using System.Numerics;
					
public class Program
{
	public static void Main()
	{
		System.Numerics.BigInteger big1 = Factorial(9302);
		System.Console.WriteLine(big1);
	}
	
	private static System.Numerics.BigInteger Factorial(System.Numerics.BigInteger n) {
		System.Numerics.BigInteger results =
			new BigInteger(1);
		
		for(int i=1; i<=n; i++)
			results *= i;
		
		return results;
	}
	
}
 BigInteger OBEB, OKEK vs. de hesaplanabiliyor. Komple bir başvuru için: https://docs.microsoft.com/tr-tr/dotnet/api/system.numerics.biginteger?view=netframework-4.8
Ekleyen: cevapsitesi
Değiştiren: cevapsitesi
Cevap olarak seçen: cevapsitesi
10.03.20 02:09
Büyük sayılarla çalışmak için  BigInteger  yapısını kullanırız. BigInteger yapısı  System.Numerics   isim alanında var. Bu isim alanını kullanabilmek için çözüm gezgininde projenizin  References  ağacını sağ tıklayın, sırasıyla " Add references / Assemblies " seçeneklerini tıklayın. Arama kutusuna  Numerics  yazarak  System.Numerics  'i bulun ve ekleyin. Örnek: using System.Numerics;
					
public class Program
{
	public static void Main()
	{
		System.Numerics.BigInteger big1 = Factorial(9302);
		System.Console.WriteLine(big1);
	}
	
	private static System.Numerics.BigInteger Factorial(System.Numerics.BigInteger n) {
		System.Numerics.BigInteger results =
			new BigInteger(1);
		
		for(int i=1; i<=n; i++)
			results *= i;
		
		return results;
	}
	
}
Ekleyen: cevapsitesi
Değiştiren: cevapsitesi
Cevap olarak seçen: cevapsitesi
 
En fazla 3 eski durum gösterilir.