skip to main | skip to sidebar

PROGRAMACIÓN 1

jueves, 12 de noviembre de 2009

practica 10.2

CONSOLA
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PRACTICA_10_1C
{
class Program
{
static void Main(string[] args)
{
int[] RESISTENCIAS = { 16, 27, 39, 56, 81 };
int[] CORRIENTE = new int[5];
int[] POTENCIA = new int[5];
int TOTAL = 0;
int I;
for (I = 0; I <= 4; I = I + 1)
{
Console.WriteLine("Introduce corriente:", I + 1);
CORRIENTE[I] = int.Parse(Console.ReadLine());
POTENCIA[I] = RESISTENCIAS[I] * CORRIENTE[I] * CORRIENTE[I];
TOTAL = TOTAL + POTENCIA[I];
}
Console.WriteLine("RESISTENCIA CORRIENTE POTENCIA");
Console.WriteLine("_________________________________________________");
for (I = 0; I <= 4; I = I + 1)
{
Console.WriteLine("{0}\t\t\t{1}\t\t{2}", RESISTENCIAS[I], CORRIENTE[I], POTENCIA[I]);
}
Console.WriteLine("\n\nEl total es:{0}", TOTAL);
Console.ReadKey();
}
}
}





Publicado por Rosa en 22:51

No hay comentarios:

Publicar un comentario

Entrada más reciente Entrada antigua Inicio
Suscribirse a: Enviar comentarios (Atom)

Seguidores

Archivo del blog

  • ▼  2009 (65)
    • ►  diciembre (16)
    • ▼  noviembre (10)
      • EXTRA 3 VISUAL
      • EXTRA 3 CONSOLA
      • EXTRA 2 CONSOLA
      • EXTRA 2 VISUAL
      • EXTRA 1 VISUAL
      • EXTRA 1 CONSOLA
      • practica 10.2
      • practica 10.1
      • PRACTICA 9
      • PRACTICAS 8
    • ►  octubre (21)
    • ►  septiembre (16)
    • ►  agosto (2)

Datos personales

Mi foto
Rosa
Ver todo mi perfil