sábado, 1 de noviembre de 2008

Practica 1 Problema 4

using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int N1, N2, N3, Suma, Promedio, Producto;

Console.WriteLine("Introduce 3 valores enteros ");

N1 = int.Parse(Console.ReadLine());
N2 = int.Parse(Console.ReadLine());
N3 = int.Parse(Console.ReadLine());

Suma = N1 + N2 + N3;

Promedio = Suma / 3;
Producto = N1 * N2 * N3;
Console.WriteLine("La suma de " +N1+ "+" +N2+ "+" +N3+ " = " + Suma);
Console.WriteLine("El promedio es " + Promedio);
Console.WriteLine("El producto de " +N1+ "*" +N2+ "*" +N3+ " = " + Producto);
Console.ReadLine();
}
}
}

No hay comentarios: