erehh

chonchxi 1.1 davaleba 1

Oct 27th, 2022
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.95 KB | None | 0 0
  1. namespace INFINIT
  2. {
  3.     class program
  4.     {
  5.  
  6.         static string[] infIntArray;
  7.         static char[] sumArr;
  8.  
  9.         static void Main()
  10.         {
  11.             Console.WriteLine("Hello, this is an INFINIT program!");
  12.             Console.WriteLine();
  13.  
  14.             Console.WriteLine("Enter how many huge integers would you like to store: ");
  15.             Console.WriteLine("(keep int mind, integers entered must be larger than int or long datatype.");
  16.             Console.WriteLine("Int (- 2 147 483 648 : 2 147 483 647)");
  17.             Console.WriteLine("Long (-9 223 372 036 854 775 808 : 9 223 372 036 854 775 807)");
  18.             int answAmount = int.Parse(Console.ReadLine());
  19.  
  20.            
  21.             Console.WriteLine($"Enter {answAmount} integers: ");
  22.  
  23.             infIntArray = new string[answAmount];
  24.             for(int i=0; i < answAmount; i++)
  25.             {
  26.                 infIntArray[i] = Console.ReadLine();
  27.             }
  28.             Console.WriteLine();
  29.  
  30.             int zero = 0;
  31.             for (int i = 0; i < infIntArray.Length; i++)
  32.             {
  33.                 char[]Arr = infIntArray[i].ToCharArray();
  34.  
  35.                 Console.WriteLine($"{i+1}) ");
  36.                 for(int j = Arr.Length; j >0 ; j--)
  37.                 {
  38.                     Console.Write($"{Arr[j-1]}*10^{zero++} ");
  39.                 }
  40.  
  41.                 Console.WriteLine();
  42.             }  
  43.         }
  44.  
  45.         static void sum(char[]Arr1, char[]Arr2)
  46.         {
  47.             int len = 0;
  48.  
  49.             if (Arr1.Length > Arr2.Length)
  50.             {
  51.                 len = Arr1.Length;
  52.             }
  53.             else if (Arr2.Length > Arr1.Length)
  54.             {
  55.                 len = Arr2.Length;
  56.             }
  57.             else
  58.             {
  59.                 len = Arr1.Length;
  60.             }
  61.  
  62.             sumArr = new char[len];
  63.             for(int i = 0; i < sumArr.Length; i++)
  64.             {
  65.                 sumArr[i] =
  66.             }
  67.         }
  68.     }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment