You are on page 1of 1

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pr_1
{
class Program
{
static void Main(string[] args)
{
string[] Student;
int i_Max;
string option;

Console.WriteLine("Numarul de studenti = ");


i_Max = Convert.ToInt32(Console.ReadLine());
Student = new string[i_Max];

while (true)
{
Console.WriteLine("1. Introducerea datele studentilor");
Console.WriteLine("2. Afisarea studentilor la ecran ");
Console.WriteLine("3. Iesire");
Console.WriteLine("Alegeti optiunea dorita: ");
option = Console.ReadLine();

if (option == "1")
{
Console.WriteLine("==============================");
Console.WriteLine("Introducem datele studentilor:");
Console.WriteLine("==============================");
for (int i = 0; i < i_Max; i++)
{
Console.Write("Student[" + i + "] =");
Student[i] = Console.ReadLine();
}
}
else if (option == "2")
{
Console.WriteLine("Afisati tiparul studentilor: ");
for (int j = 0; j < i_Max; j++)
{
Console.Write("Student[" + j + "] =");
Console.WriteLine(Student[j]);
}
}
else break;

}
}
}

You might also like