Dia De La Independencia
public class Datos
{
private string nombre;
private int edad;
private string telefono;
private string dirreccion;
private int nota1;
private intnota2;
private int nota3;
public string Nombre
{
get{return nombre;}
set{nombre = value;}
}
public int Edad
{
get{return edad;}
set{edad= value;}
}
public string Telefono
{
get{return telefono;}
set{telefono = value;}
}
public string Dirreccion
{
get{return dirreccion;}set{dirreccion = value;}
}
public int Nota1
{
get{return nota1;}
set{nota1 = value;}
}
public int Nota2
{
get{return nota2;}set{nota2 = value;}
}
public int Nota3
{
get{return nota3;}
set{nota3 = value;}
}
public float promedio()
{
float resultado;
resultado =(nota1 + nota2 + nota3)/3;
return resultado;
}
}
using System;
using System.Collections.Generic;
public class AmbienteNotas
{
public static void Main(string[] args)
{int respuesta;
List<Datos> lista = new List<Datos>();
Datos alumnos = new Datos();
respuesta = 0;
do
{
Console.WriteLine("ingrese nombre");
alumnos.Nombre= Console.ReadLine();
Console.WriteLine("ingese edad");
alumnos.Edad = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("ingrese telefono");
alumnos.Telefono =Console.ReadLine();
Console.WriteLine("ingrese dirreccion");
alumnos.Dirreccion = Console.ReadLine();
Console.WriteLine("ingrese nota1");
alumnos.Nota1 = Convert.ToInt32(Console.ReadLine());Console.WriteLine("ingrese nota2");
alumnos.Nota2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("ingrese nota3");
alumnos.Nota3 = Convert.ToInt32(Console.ReadLine());...
Regístrate para leer el documento completo.