Notizen
Programación
Inhalt der Notizen (1)
Seite 1

Ejemplo de programas:
int x = 0, c = 0;Console.Write("Dame un número: ");
x = Int16.Parse(Console.ReadLine());
do
{
if (x % 2 == 0)
{
x = x / 2;
Console.WriteLine("Siguiente Valor es: " + x);
}
else
{
x = (x * 3) + 1;
Console.WriteLine("Siguiente Valor es: " + x);
} c++;
} while (x >= 2) ;
if (x == 1)
{
Console.WriteLine("El Último Valor es: " + x);
}
if (x
{
Console.WriteLine("Error");
}
Console.WriteLine("El Número de Operaciones es: " + c);
Console.ReadKey();
Links de interes:
http://bit.ly/1dolQAg (operaciones)
http://bit.ly/1c47jKQ (do... while)
http://bit.ly/1e9SUMQ (for)
http://bit.ly/1bO6s6p (while)
http://bit.ly/1gJBSdu (if... else)
http://bit.ly/1oVbp0s (switch)
Pasos para programar:
1. Idealiza (diagrama de flujo)
2. Identifica lo que se pide
3. Conecta (instrucciones)
4. Finaliza
Videos del profe:
http://bit.ly/1nPNSuE (Primer repaso)
http://bit.ly/1jKGX5l (do while del profe)
descarcega@itesm.mx
Nueva Página
Informationen
- Beschreibung
- Apuntes primer parcial
- Erstellt von
- mauriciohdzmtz · Feb 2014
- Aktualisiert
- 21 Aug 2016
- Aufrufe
- 63
- Tags
- Bewertung