using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace
MATRIZ
{
class Program
{
static void Main(string[] args)
{
int[,]
a,d,e;
int
b, c,x,y,w;
string aux;
a = new int[3, 3];
d = new int[3, 3];
e = new int[3, 3];
Console.SetCursorPosition(18, 3);
Console.Write("A");
Console.SetCursorPosition(38,
3);
Console.Write("D");
x = 5;
for (b = 0; b < 3; b++)
{
c = 0;
y = 12;w=35;
while
(c < 3)
{
Console.SetCursorPosition(y,
x);
aux = Console.ReadLine();
a[c, b] = int.Parse(aux);
Console.SetCursorPosition(w,
x);
aux = Console.ReadLine();
d[c, b] = int.Parse(aux);
w=w+5;
y = y + 5;
e[c,b]=a[c,b]+d[c,b];
c++;
}
x = x + 2;
}
Console.ReadKey();
Console.SetCursorPosition(28,
15);
Console.Write("E");
x = 17;
for (b = 0; b < 3; b++)
{
c = 0;
w=25;
while
(c < 3)
{
Console.SetCursorPosition(w,
x);
Console.Write(e[c, b]);
w=w+5;
c++;
}
x = x + 2;
}
Console.ReadKey();
}
}
}
No hay comentarios:
Publicar un comentario