First of all, I want to thank you for your time when it comes to reading my question. I am new to c # and in programming in general, and I am having problems with something simple. I want to add two long integers as a string of text, I have reached the point where I break down the chains and store them in two arrays of a dimension but then I am not able to add both and receive a coherent result. Greetings Isra.
Edit 1
I add the code where I have already surrendered ....
' static void Main(string[] args)
{
string num1, num2;
int[] numeros1;
int[] numeros2;
int suma = 0;
Console.WriteLine("Introduce un numero largo: ");
num1 = Console.ReadLine();
Console.WriteLine("Introduce un numero largo: ");
num2 = Console.ReadLine();
numeros1 = new int[num1.Length];
for(int x = 0; x < num1.Length-1; x++)
{
numeros1[x] = num1[x];
}
numeros2 = new int[num2.Length];
for (int x = 0; x < num1.Length - 1; x++)
{
numeros2[x] = num2[x];
}
for (int x = 0; x < numeros1.Length; x++)
{
for (int y = 0; y < numeros2.Length; y++)
{
suma += (numeros1[x] + numeros2[y]);
}
}
Console.WriteLine("La suma de las dos cadenas introducidas es: {0}", suma);
Console.ReadKey();
}'