miércoles, 26 de noviembre de 2008

Practica 13

Problema 1
using System;
using System.Collections.Generic;
using System.Text;
namespace Practica13
{
class Program
{
static void Main(string[] args)
{
Arreglo A1 = new Arreglo(5);
int I, dato;
for (I = 0; I <>
{
Console.Write("Introduce dato {0}:",(I + 1));
dato = int.Parse(Console.ReadLine()); A1.insertardato(I, dato); }
Console.WriteLine("\nLa suma es: {0}",A1.sumadatos(5));
Console.WriteLine("El dato mayor es: {0}", A1.mayor(5));
Console.WriteLine("El dato menor es: {0}", A1.menor(5));
Console.WriteLine("El promedio es: {0} ", A1.promedio(5));
Console.ReadLine(); } } }





using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Practica13v
{
public partial class Calcular : Form
{

double[] dato ;
double may, men,suma, promedio;
int I;
public Calcular()
{
InitializeComponent();
dato = new double [5];
I = 0;
}
private void tdato_Click(object sender, EventArgs e)
{
if (I <>
suma = suma + dato[I];
promedio = suma / 5;
tbd.Clear(); I++;
if (I == 5) { tbd.Enabled = false;
} } }
private void button1_Click(object sender, EventArgs e)
{ may = dato[0];
for (I = 0; I <> may)
{ may = dato[I]; }
}
men = dato[0];
for (I = 0; I <>
{ if ( dato[I]< men =" dato[I];">
} } label2.Text = ("La suma es: " + suma.ToString());
label3.Text = ("El dato mayor es: " + may.ToString());
label4.Text = ("El dato menor es: " + men.ToString());
label5.Text = ("El promedio es: " + promedio.ToString());
} private void Limpiar_Click(object sender, EventArgs e)
{ tbd.Clear(); tbd.Enabled = true;
label2.Text = ""; label3.Text = "";
label4.Text = ""; label5.Text = "";
} } }

martes, 18 de noviembre de 2008

Practica 12



Problema 1

using System;
using System.Collections.Generic;
using System.Text;
namespace Practica12_problema_1c
{
class Program
{
static void Main(string[] args)
{int I;
double[] corriente = new double[10];
double[] voltaje = new double[10];
double[] resistencia = new double[10];
for(I=0; I<10; I++)
{
Console.Write("introduce valor de resistencia {0}:",I+1);
resistencia[I] =double.Parse (Console.ReadLine());
}
Console.WriteLine("");
for (I = 0; I < 10; I++)
{
Console.Write("Introduce corriente {0}:",I+1);
corriente[I] = double.Parse(Console.ReadLine());
voltaje[I] = (corriente[I] * resistencia[I]);
}
Console.WriteLine("\n\tCorriente "+"Resisntecia "+" Voltios");
for (I = 0; I < 10; I++)
{
Console.WriteLine("\t "+corriente[I]+" "+resistencia[I]+" "+voltaje[I]);
}
Console.ReadLine();
}
}
}


lunes, 10 de noviembre de 2008

Practica 11

Problema1
using System;
using System.Collections.Generic;
using System.Text;
namespace Practica11_problema_1c
{
class Program
{
static void Main(string[] args)
{
double e, R, suma, promedio, r;
for (e = 1; e <= 4; e = e + 1) { Console.WriteLine("\nExperimento " + e);
suma = 0; for (R = 1; R <= 6; R = R + 1)
{
Console.Write("Introdusca el resultado {0}:", R);
r = double.Parse(Console.ReadLine()); suma = suma + r;
}
promedio = suma / 6;
Console.WriteLine("\nSu promedio de ensaye es:" + promedio);
Console.ReadLine(); } } } }



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Practica11_problema_1v
{
public partial class Form1 : Form
{
double[] n1;
double[] n2;
double[] n3;
double[] n4;
double[] n5;
double[] n6;
double[] suma;
double[] promedio;
int I=0;
public Form1()
{
InitializeComponent();
n1 = new double[6];
n2 = new double[6];
n3 = new double[6];
n4 = new double[6];
n5 = new double[6];
n6 = new double[6];
suma= new double[4];
promedio=new double[4];
}
private void Calcular_Click(object sender, EventArgs e)
{
for (I = 0; I < i =" I">

{ list.Items.Add ( "El experimento "+( I ));

list.Items.Add ("La suma es: " + suma[I]);

list.Items.Add ("El promedio es:" + promedio[I]);

list.Items.Add("");

} } private void Limpiar_Click(object sender, EventArgs e)

{ tbn2.Clear();

tbn3.Clear();

tbn4.Clear();

tbn5.Clear();

tbn6.Clear();

tbn1.Clear();

tbn1.Text = "0";

tbn2.Text = "0";

tbn3.Text = "0";

tbn4.Text = "0";

tbn5.Text = "0";

tbn6.Text = "0";

label7.Text = "";

label8.Text = "";

tbn1.Enabled = true;

tbn2.Enabled = true;

tbn3.Enabled = true;

tbn4.Enabled = true;

tbn5.Enabled = true;

tbn6.Enabled = true;

list.Items.Clear();

}

private void Salir_Click(object sender, EventArgs e)

{ Close(); }

private void Dato_Click(object sender, EventArgs e)

{ if (I <>

{ n1[I] = double.Parse(tbn1.Text);

n2[I] = double.Parse(tbn2.Text); n3[I] = double.Parse(tbn3.Text); n4[I] = double.Parse(tbn4.Text);

n5[I] = double.Parse(tbn5.Text); n6[I] = double.Parse(tbn6.Text);

suma[I] = n1[I] + n2[I] + n3[I] + n4[I] + n5[I] + n6[I];

promedio[I] = suma[I] / 6;

tbn1.Clear();

tbn2.Clear();

tbn3.Clear();

tbn4.Clear();

tbn5.Clear();

tbn6.Clear();

I++; } if (I == 4) { tbn1.Enabled = false;

tbn2.Enabled = false;

tbn3.Enabled = false; tbn4.Enabled = false;

tbn5.Enabled = false; tbn6.Enabled = false; } } } }




Problema2

using System;
using System.Collections.Generic;
using System.Text;
namespace Practica11problema_2c
{
class Program
{
static void Main(string[] args)
{
double sumag, G, V, sumavol,voltaje,promg,prom;
sumag=0;
Console.Write("introduce el voltaje para los generadores");
for(G=1; G<=6; G=G+1)
{
sumavol=0;
Console.WriteLine("\n"+G+"Generador");
for(V=1; V<=3; V=V+1)
{
Console.Write("introduce voltaje{0}:",V);
voltaje=double.Parse(Console.ReadLine());
sumavol=sumavol+voltaje; } prom = sumavol / 3;
sumag = sumag + prom;
Console.WriteLine("\nSu voltaje promedio es: "+prom);
} promg = sumag / 5;
Console.Write("El promedio de voltaje de todos los generadores es: ");
Console.WriteLine(""+promg);
Console.ReadLine();
} } }

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Prcatica11_problema_2v
{
public partial class Form1 : Form
{
double[] v1;
double[] v2;
double[] v3;
double[] volprom;
double[] sumavol;
double[] dato;
int I;
public Form1()
{
InitializeComponent();
v1 = new double[5];
v2 = new double[5];
v3 = new double[5];
dato = new double[5];
volprom = new double[5];
sumavol = new double[5];
I = 0;
}
private void Calcular_Click(object sender, EventArgs e)
{
for (I = 0; I < i =" I">
{
list.Items.Add("Generador:" + dato[I]);
list.Items.Add("El voltaje promedio es:" + volprom[I]);
list.Items.Add("" );
} } private void Salir_Click(object sender, EventArgs e)
{ Close();
} private void Limpiar_Click(object sender, EventArgs e) { tbv1.Clear(); tbv2.Clear(); tbv3.Clear(); tbv1.Text = ""; tbv2.Text = "";
tbv3.Text = "";
list.Items.Clear(); tbv1.Enabled = true;
tbv2.Enabled = true;
tbv3.Enabled = true; }
private void Dato_Click(object sender, EventArgs e)
{ if (I <>
v2[I] = double.Parse(tbv2.Text);
v3[I] = double.Parse(tbv3.Text);
sumavol[I] = v1[I] + v2[I] + v3[I];
volprom[I] = sumavol[I] / 3;
dato[I]=I+1;
tbv1.Clear(); tbv2.Clear();
tbv3.Clear(); I++; } if (I == 5)
{ tbv1.Enabled = false; tbv2.Enabled = false;
tbv3.Enabled = false; } } } }




Problema3
using System;
using System.Collections.Generic;
using System.Text;
namespace Practica11_problema_3c
{
class Program
{
static void Main(string[] args)
{
int mayor, posmayor, menor, posmen, suma = 0, prom;
int[] Elementos = new int[5];
int I;
Console.WriteLine("Introduce siguientes valores");
for (I = 0; I < mayor =" Elementos[0];" posmayor =" 0;" i =" 1;"> mayor)
{
mayor = Elementos[I];
posmayor = I;
}
}
Console.WriteLine("\nEl dato mayor es: " + mayor);
Console.WriteLine("Su posicion es: " + posmayor);
menor = Elementos[0];
posmen = 0;
for (I = 1; I <>
{ menor = Elementos[I]; posmen = I; }
}
Console.WriteLine("\nEl dato menor es: " + menor);
Console.WriteLine("Su posicion es: " + posmen);
suma = 0; for (I = 0; I <>
suma = suma + Elementos[I];
}
prom = suma / 5;
Console.WriteLine("El promedio de los elementos es: " + prom);
Console.ReadLine();
} } }



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Practica11_problema_3v
{
public partial class Form1 : Form
{
double suma;
double prom;
double[] x; int I;
public Form1()
{
InitializeComponent();
x = new double[10];
I = 0;
suma = 0;
}
private void Calcular_Click(object sender, EventArgs e)
{
double mayor = x[0];
double posmay = 0;
double menor = x[0];
double posmen = 0;
mayor = x[0];
for (I = 1; I <> mayor)
{ mayor = x[I];
posmay = I+1;
}
}
menor = x[0];
for (I = 1; I <>
{
if (x[I] <>
{
menor = x[I]; posmen = I+1;
} }
label2.Text = "El dato menor es " + menor.ToString() + " su pososcion es " + posmen.ToString(); label3.Text = "El dato mayor es " + mayor.ToString() + " su posicion es " + posmay.ToString(); { label4.Text = "Su promedio es " + prom.ToString();
} } private void button1_Click(object sender, EventArgs e) { if (I <>
{ x[I] = double.Parse(tbx.Text);
suma = suma + x[I]; prom = suma / 10;
tbx.Clear(); I++;
if (I == 10) { tbx.Enabled = false;
} } } private void Limpiar_Click(object sender, EventArgs e)
{ tbx.Clear();
tbx.Text = "0";
label2.Text = "";
label3.Text = "";
label4.Text = "";
tbx.Enabled = true;
} private void Salir_Click(object sender, EventArgs e)
{ Close();
} } }

martes, 4 de noviembre de 2008

Practica 10

Problema 1

using System;
using System.Collections.Generic;
using System.Text;
namespace Examen_1al_99
{
class Program
{
static void Main(string[] args)
{
double I;
Console.WriteLine("Numero" + " Cuadrado");
for (I = 1; I <= 99; I = I + 2)
{
Console.WriteLine("" + I + "\t " + I * I);
}
Console.ReadLine();
}
}
}













Problema 2

using System;
using System.Collections.Generic;
using System.Text;
namespace Examen_xy
{
class Program
{
static void Main(string[] args)
{
double x, y;
Console.WriteLine("X" + " \t Y");
for (x = 5; x <= 10; x = x + 0.02)
{ y = (3 * x * x * x - 2 * x * x + x);
Console.WriteLine("" + x + " \t " + y); }
Console.ReadLine();
}
}
}








Problema 3

using System;
using System.Collections.Generic;
using System.Text;
namespace Examen_2_al_200
{
class Program
{
static void Main(string[] args)
{
double I, suma;
suma = 0;
for (I = 2; I <= 200; I = I + 2)

{ suma = suma + I; if (I >= 200)
{
Console.WriteLine("La suma es: {0}", suma);
}
}
Console.ReadLine();
}
}
}














Problema 4

using System;
using System.Collections.Generic;
using System.Text;
namespace Examen_grados
{
class Program
{
static void Main(string[] args)
{
double vinicial, vfinal, celcius, I;
Console.WriteLine("Introduce la temperatura inicial en grados fahrenheit");
vinicial = double.Parse(Console.ReadLine());
Console.WriteLine("Introduce el valor final en grados fahrenheit");
vfinal = double.Parse(Console.ReadLine());
Console.WriteLine("\nFahrenheit" + "\t Celcius");
for (I = vinicial; I <= vfinal; I = I + 2) { celcius = (5.0 / 9.0) * (I - 32);
Console.WriteLine("" + I + " " + celcius); }
Console.ReadLine();
}
}
}








jueves, 30 de octubre de 2008

Practica9

Problema1

1.-Escriba un programa en C# para convertir grados celsius a fahrenheit.El programa debe solicitar el valor inicial en grados celsius, la cantidad de conversiones que se efectuarán y el incremento entre los valores en grados celsius. La pantalla debe tener los encabezados apropiados y una lista con los valores en grados celsius y los correspondientes en grados fahrenheit. Utilice la siguiente relaciónfahrenheit=(9.0/5.0)*celsius + 32.0

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Practica9_problema_1c
{
class Program
{
static void Main(string[] args)
{
double vinicial, n, inc,celcius,I,fahrenheit;
Console.WriteLine("Introduce el valor inicial en grados celcius");
vinicial = double.Parse(Console.ReadLine());
Console.WriteLine("Introduce la cantidad de conversiones");
n=double.Parse(Console.ReadLine());
Console.WriteLine("Introduce el los imcremntos entre los grados celcius");
inc=double.Parse(Console.ReadLine());
celcius=vinicial;
Console.WriteLine("\n Celcius " + " Fahrenheit");
for (I = 1; I <= n; I = I + 1)

{ fahrenheit = (9.0 / 5.0) * (celcius + 32);

Console.WriteLine( " "+celcius + " "+fahrenheit);

celcius = celcius + inc; }

Console.ReadLine(); } } }




-----------------------------------------------------------------------------------------------
Problema2

2.-Haga un programa que permita leer un valor N, luego que lea N numeros de entrada(utilizando un ciclo) imprimir el total, el promedio y el dato mayor.

using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
double n, suma, i, mayor, valor;
Console.WriteLine("introdusca la cantidad de valores en procesar");
n = double.Parse(Console.ReadLine());
suma = mayor = 0;
for (i = 1; i <= n; i = i + 1) { Console.WriteLine("\nintroduce valor"); valor = double.Parse(Console.ReadLine()); suma = suma + valor; if (valor > mayor)
{
mayor = valor;
}




else




{mayor=n




}
Console.WriteLine("la suma es {0}", suma);
Console.WriteLine("el promedio es{0}", suma / n);
Console.WriteLine("el dato mayor es{0}", mayor);
}
Console.ReadLine();


}
}
}






--------------------------------------------------------------------------
Problema3
3.-Elaborar un programa que permita leer un número N y que imprima un triángulo de asteriscos, por ejemplo si el valor leido es 5, imprimir***************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Practica9_problema_3c
{
class Program
{
static void Main(string[] args)
{
int n, i, j;
Console.WriteLine("introduce el valor n");
n = int.Parse(Console.ReadLine());
for (i = 1; i <= n; i = i + 1)

{

Console.Write("\n"); for (j = 1; j <= i; j = j + 1)

{

Console.Write("*");

}

}

Console.ReadLine(); } } }


--------------------------------------------------------------------------
Problema4
4.-Una pelota de golf se lanza desde un aeroplano. La distancia, d, que la pelota cae en t segundos está dada por la ecuación d=(1.0/2.0)*g*t*t, donde g es la acelaración producida por la gravedad y es igual a 32 pies/seg2. Utilizando esta información, escriba un programa que muestre la distancia que la pelota cae en cada intervalo de un segundo durante diez segundos y la distancia total que la pelota ha recorrido al final de cada intervalo. La salida debe completar la sig. tabla:Tiempo

-----Distancia en el----------Distancia-----------intervalo actual---------total0--------------------------0.0--------------------0.01-----------------16.0------------ ---16.0...10
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Practica9_problema_4c
{
class Program
{
static void Main(string[] args)
{double T,distancia,dt;
Console.WriteLine("\tTiempo"+" Distancia entre el"+" Distancia total");
Console.WriteLine("\t " + " intervalo actual" + " total");
dt = 0;
for (T = 1; T <= 10; T = T + 1) { distancia = (1.0 / 2.0) * 32 * T * T;




Console.WriteLine(" \t "+T + " "+ distancia + " "+ dt); dt = dt + distancia; }




Console.ReadLine();




}

}

}




viernes, 24 de octubre de 2008

Practica8







Problema1




1.-Elaborar un programa en C# que contabilice una cuenta de cheques. Al inicio se le introduce el nombre del cuentahabiente . Al inicio se le introduce el nombre del cuentahabiente y el saldo inicial. A continuación se puede hacer depósitos y retiros. Cuando sea depósito se incrementa al saldo, y cuando sea retiro se resta. Este programa terminará cuando ya no se desee hacer movimientos. Se requiere la impresión del siguiente reporte:Estado de cuentaCuentahabiente:Saldo inicial:





using System;
using System.Collections.Generic;
using System.Text;
namespace Prcatica8_Problema2c
{
class Program
{
static void Main(string[] args)
{
double sinisial = 0.0, deposito = 0.0, retiro = 0.0, saldo = 0.0;
String Nombre;
char seguir;
int opc;
{
Console.Write("Introdusca el nombre del cliente : ");
Nombre = Console.ReadLine();
Console.WriteLine("\n Bienvenido : {0}", Nombre);
Console.Write("\n Introdusca su saldo inicial : ");
saldo = double.Parse(Console.ReadLine());
Console.Write("\n Saldo : {0}", saldo);
sinisial = saldo;
do
{
Console.Clear();
Console.Write("\n tipo de operacion : ");
Console.Write("\n 1) Deposito : ");
Console.Write("\n 2) Retiro : ");
Console.Write("\n Introdusca la opcion : ");
opc = int.Parse(Console.ReadLine());
switch (opc)
{
case 1: Console.Write("\n Introdusca deposito : ");
deposito = double.Parse(Console.ReadLine());
saldo = saldo + deposito;
Console.WriteLine("\n Nombre del cliente: {0}", Nombre);
Console.Write("\n Saldo inicial :{0} ", sinisial);
Console.Write("\n Deposito : {0}", deposito);
Console.Write("\n Nuevo saldo :{0} ", saldo);
break;
case 2: Console.Write("\n introdusca retiro : ");
retiro = double.Parse(
Console.ReadLine());
if (retiro < saldo =" saldo" seguir ="">
Console.ReadLine());
" seguir ="="" seguir




-----------------------------------------------------------------------------------




Problema2




2.-Una maquina que costó $28,000.00 se deprecia a razón de $4000.00 por año durante siete años. Escriba un programa en C# que calcule y despligue una tabla de depreciación para siete años. La tabla debe tener el sig. formato:




---Año-----Depreciación-----Valor a fin de año-----Depreciación acumulada





using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Practica8_problema_2c
{
class Program
{
static void Main(string[] args)
{
int dep = 4000, maquina = 28000, depacum = 0, a¤o=1;
while (a¤o <= 7) { maquina = maquina - dep; depacum += dep; Console.WriteLine("\n\tA¤o Depreciacion valor a fin de a¤o Depreciacion acumulada"); Console.WriteLine("\n\t{0}--------${1}---------------${2}-----------------${3}", a¤o, dep, maquina, depacum); a¤o++; } Console.ReadLine(); } } }





jueves, 16 de octubre de 2008

Practica 7

Problema 1

1.-Un ángulo se considera agudo si es menor a 90 grados, obtuso si es mayor de 90 grados y recto si es igual a 90 grados. Utilizando esta información escriba un programa que acepte un ángulo, en grados, y muestre el tipo de ángulo que corresponde al valor introducido en grados.

using System;
using System.Collections.Generic;
using System.Text;
namespace Practica7_problema1
{
class Program
{
static void Main(string[] args)
{
double angulo;
Console.WriteLine("introduce el valor del angulo en grados");
angulo = double.Parse(Console.ReadLine());
if (angulo <> 90)
{
Console.WriteLine("El angulo es obtuso");
}
else
{
Console.WriteLine("El angulo es recto");
}
}
Console.ReadLine();
}
}
}





------------------------------------------------------------------------


Problema2

2-El cuadrante en el cual se ubica una línea dibujada desde el origen está determinado por el ángulo que la línea forma con el eje positivo de x en la siguiente forma:

Angulo del eje positivo de x CUADRANTE
Entre 0 y 90 grados I
Entre 90 y 180 grados II
Entre 180 y 270 grados III
Entre 270 y 360 grados IV

Utilizando esta información, escriba un programa que acepte el ángulo de la línea como dato de entrada por el usuario y que despliegue el cuadrante apropiado conforme a los datos. (Nota: Si el ángulo es exactamente 0,90,180,270 grados, la línea correspondiente no se ubica en ningún cuadrante, sino en un eje. )



using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double angulo;
Console.WriteLine("Introduce el angulo de la linea");
angulo = double.Parse(Console.ReadLine());
if (angulo > 0 && angulo <> 90 && angulo <> 180 && angulo <> 270 && angulo < 360) { Console.WriteLine("cuadrante 4"); } else { if (angulo == 0 angulo == 360) { Console.WriteLine("Esta en el eje positivo x"); } else { if (angulo == 90) { Console.WriteLine("Esta en el eje positivo y"); } else { if (angulo == 180) { Console.WriteLine("Esta en el eje negativo x"); } else { if (angulo == 270) { Console.WriteLine("Esta en el eje negativo y"); } } } } } } } } Console.ReadLine(); } }
}




------------------------------------------------------------------------

Problema3
3.-Considere una programa para simular una Casa de Cambio para compra y venta de dólares y también compra y venta de euros. El usuario puede tener pesos,dólares o euros.
Solicite el tipo de cambio a la compra y a la venta
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Practica7_problema_3c
{
class Program
{
static void Main(string[] args)
{ double n1,n2,n3,n4,cantidad,saldo;
char seguir;
int opc;
Console.Clear();
Console.WriteLine("Binvenidoa la casa de cambio");
Console.WriteLine("\nIntrodusca ");
Console.Write("La venta del dolar:");
n3=double.Parse(Console.ReadLine());
Console.Write("La compra del dolar:");
n1 =double.Parse(Console.ReadLine());
Console.Write("La venta del euro:");
n4 =double.Parse(Console.ReadLine());
Console.Write("la compra del euro:");
n2 =double.Parse(Console.ReadLine());

do{

Console.Write("\n\n Que desea hacer : ");
Console.Write("\n 1) Comprar dolares ");
Console.Write("\n 2) Vender dolares ");
Console.Write("\n 3) Comprar euros ");
Console.Write("\n 4) Vender euros ");
Console.Write("\n Introdusca la opcion : ");
opc = int.Parse(Console.ReadLine());
switch (opc)
{
case 1: Console.Write("\n Introdusca la cantidad : ");
cantidad = double.Parse(Console.ReadLine());
saldo = cantidad * n2;
Console.WriteLine("\n Su cambio: ${0}", saldo);
break;

case 2: Console.Write("\n Introdusca la cantidad : ");
cantidad = double.Parse(Console.ReadLine());
saldo = cantidad* n3;
Console.WriteLine("\n Su cambio: ${0}", saldo);
break;
case 3: Console.Write("\n Introdusca la cantidad : ");
cantidad = double.Parse(Console.ReadLine());
saldo = cantidad* n4;
Console.WriteLine("\n Su cambio: ${0}", saldo);
break;
case 4: Console.Write("\n Introdusca la cantidad : ");
cantidad = double.Parse(Console.ReadLine());
saldo = cantidad* n2;
Console.WriteLine("\n Su cambio: ${0}", saldo);
break;
default:
Console.WriteLine("\n\n\n\n\n\n\nintrodujo la opcion in correcta");
break;

}




Console.WriteLine("\n Desea continuar(S/N) ");
seguir = char.Parse(Console.ReadLine());
Console.Clear();

Console.Write("\n Compra de dolar :{0} ",n3);
Console.Write("\n Venta de dolar :{0} ",n4);
Console.Write("\n Compra de euro :{0} ", n1);
Console.Write("\n Venta de euro :{0} ",n2);
}


while (seguir == 's' seguir == 's');

Console.ReadLine();


}
}
}