Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace RELATORIO_N_ALUNOS_POO
- {
- class Program
- {
- static void Main(string[] args)
- {
- //declaração de uma lista
- List<Aluno> alunos = new List<Aluno>();
- alunos.Add(nome);
- alunos.Add(P1);
- alunos.Add(P2);
- for (int i = 0; i < alunos.Count; i++)
- {
- Console.WriteLine("Diite o nome do aluno: ");
- string nome = Console.ReadLine();
- Console.WriteLine("Digite a P1 do aluno: ");
- double P1 = double.Parse(Console.ReadLine());
- Console.WriteLine("Digite a P2 do aluno: ");
- double P2 = double.Parse(Console.ReadLine());
- Aluno a = new Aluno(nome, P1, P2);
- }
- //verificação de entrada de dados
- Console.WriteLine("Alunos aprovados:");
- for (int i = 0; i < alunos.Count; i++)
- {
- alunos = new List<Aluno>();
- if()
- {
- Console.WriteLine("{0} com média {1}", a.getNome(), a.getMedia());
- }
- }
- Console.WriteLine("Alunos reprovados:");
- for (int i = 0; i < alunos.Count; i++)
- {
- alunos = new List<Aluno>();
- if()
- {
- Console.WriteLine("{0} com média {1}", a.getNome(), a.getMedia());
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement