Advertisement
son86000

ALUNOS_LIST<T>

Apr 24th, 2016
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace RELATORIO_N_ALUNOS_POO
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             //declaração de uma lista
  14.             List<Aluno> alunos = new List<Aluno>();
  15.  
  16.             alunos.Add(nome);
  17.             alunos.Add(P1);
  18.             alunos.Add(P2);
  19.  
  20.             for (int i = 0; i < alunos.Count; i++)
  21.             {
  22.                 Console.WriteLine("Diite o nome do aluno: ");
  23.                 string nome = Console.ReadLine();
  24.  
  25.                 Console.WriteLine("Digite a P1 do aluno: ");
  26.                 double P1 = double.Parse(Console.ReadLine());
  27.  
  28.                 Console.WriteLine("Digite a P2 do aluno: ");
  29.                 double P2 = double.Parse(Console.ReadLine());
  30.  
  31.                 Aluno a = new Aluno(nome, P1, P2);
  32.             }
  33.  
  34.  
  35.             //verificação de entrada de dados
  36.             Console.WriteLine("Alunos aprovados:");
  37.  
  38.             for (int i = 0; i < alunos.Count; i++)
  39.             {
  40.                 alunos = new List<Aluno>();
  41.  
  42.                 if()
  43.                 {
  44.                     Console.WriteLine("{0} com média {1}", a.getNome(), a.getMedia());
  45.                 }
  46.             }
  47.  
  48.             Console.WriteLine("Alunos reprovados:");
  49.  
  50.             for (int i = 0; i < alunos.Count; i++)
  51.             {
  52.                 alunos = new List<Aluno>();
  53.  
  54.                 if()
  55.                 {
  56.                     Console.WriteLine("{0} com média {1}", a.getNome(), a.getMedia());
  57.                 }
  58.             }
  59.         }
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement