Programacion

Páginas: 2 (417 palabras) Publicado: 24 de junio de 2011
Ejercicio 3

int[,] ventas = new int[4, 3];
int[] sc = new int[3];
int v;
string a = "";
while (a != "terminar")
{Console.WriteLine("Ingrese Número de empleado : ");
int num = int.Parse(Console.ReadLine()) - 1;

Console.WriteLine("Ingrese Número que indica el almacen : ");int num2 = int.Parse(Console.ReadLine()) - 1;

Console.WriteLine("Ingrese la venta : ");
v = int.Parse(Console.ReadLine());ventas[num, num2] = v;

Console.WriteLine("Continuar o terminar");
a = Console.ReadLine();
}
int totalempleado = 0;
int totalglobal = 0;int aux;
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 3; j++)
{
totalempleado += ventas[i, j];}
aux = i + 1;
Console.WriteLine("total del dia del empleado Nº" + aux + " : " + totalempleado);
totalglobal += totalempleado;totalempleado = 0;
}
Console.WriteLine("\n");
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 3; j++){
sc[j] += ventas[i, j];
}
}
for (int i = 0; i < 3; i++)
{
aux = i + 1;Console.WriteLine("total del dia del almacen Nº" + aux + " : " + sc[i]);
}
int mayor = 0;
for (int i = 0; i < 4; i++)
{
mayor =-100000;
for (int j = 2; j >= 0; j--)
{
if (ventas[i, j] > mayor)
{
mayor = ventas[i, j];...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programación
  • Programacion
  • Programacion
  • Programación
  • Programacion
  • Programacion
  • Programacion
  • Programacion

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS