double[]a=new double[10];
double[]b=new double[10];
double[]c=new double[10];
int x;
Console.WriteLine(" a b");
for (x = 0; x < 10; x++)
{
Console.SetCursorPosition(5, x + 5);
a
- =double.Parse(Console.ReadLine());
Console.SetCursorPosition(25, x + 5);
b
- =double.Parse(Console.ReadLine());
c
}
Console.Clear();
Console.WriteLine("a b c");
for (x = 0; x < 10; x++)
{
Console.WriteLine(" {0} {1} {2}" ,a
}
Console.ReadKey();
}
}
}
int x, y;
double[] tem = new double[10];
double t;
double mayor,menor,d_prom,prom;
double suma;
suma = 0;
for (x = 0; x < 10; x++)
{
Console.WriteLine("Temperatura] = double.Parse(Console.ReadLine());
suma = suma + tem
}
prom=suma/10;
mayor=tem[0];
menor=tem[0];
for (x=0;x<10;x++)
{
if (tem
mayor = tem
else if (tem
menor=tem
}
// metodo de ordenacion burbuja
for (x = 0; x < 9; x++)
{
for (y = x + 1; y < 10; y++)
{
if (tem
{
t = tem
tem
tem[y] = t;
}
}
}
d_prom = 0;
for (x = 0; x < 10; x++)
{
if (tem
d_prom=tem
}
Console.WriteLine("mayor temperatura:{0}n, menor temperatura:{1}n, total de temperaturas:{2}n, temperatura promedio:{3}n, temperatura debajo del promedio: {4}n, ",mayor,menor,suma,prom,d_prom);
Console.ReadKey();
.........BYEEEEEEE