Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace MidtermHandsOn
- {
- class Program
- {
- static void Main(string[] args)
- {
- Student[] arr = new Student[10];
- string input = "Y";
- int i = 0;
- while (!input.Equals("N"))
- {
- Console.Write("Enter Student Name: ");
- Student temp = new Student();
- temp.Name = input;
- Console.Write("Enter Quizzes Grade: ");
- input = Console.ReadLine();
- temp.Quiz = int.Parse(input);
- Console.Write("Enter Midterms Grade: ");
- input = Console.ReadLine();
- temp.Midterms = int.Parse(input);
- Console.Write("Enter Projects Grade: ");
- input = Console.ReadLine();
- temp.Project = int.Parse(input);
- Console.Write("Enter Finals Grade: ");
- input = Console.ReadLine();
- temp.Finals = int.Parse(input);
- arr[i] = temp;
- i++;
- Console.Write("Do you still want to continue [Y/N]?");
- input = Console.ReadLine();
- }
- for (int x = 0; x < i; ++x)
- {
- Console.WriteLine("{0} \t\t {1}", arr[x].Name, arr[x].LetterGrade);
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement