- Joined
- Nov 28, 2024
- Messages
- 1
- Reaction score
- 0
C#:
using System;
namespace krasinqmashemi6ka_19112024
{
class Program
{
static void Main(string[] args)
{
Zaglavie();
Izberi();
}
static void Zaglavie()
{
Console.WriteLine("Powered by DJ KrassiBoy");
Console.WriteLine("Welcome to the student management program of 11th A GRADE");
Console.WriteLine("Loading....");
Console.WriteLine("Loading...");
}
static void Izberi()
{
Console.Write("How Many students will have in that class? ");
int kolko = int.Parse(Console.ReadLine());
Console.WriteLine("OK, " + kolko + " student/s ");
string[] name = new string[kolko];
// int i = 0;
while (true)
{
Console.WriteLine("Choose one of the options");
Console.WriteLine("1 - To Enter a student");
Console.WriteLine("2 - To Delete Students");
Console.WriteLine("3 - To Show All Students in List");
Console.WriteLine("4 - To search a student");
Console.WriteLine("5 - To Exit");
Console.Write("Insert an option number (1-5): ");
int choosenum = int.Parse(Console.ReadLine());
if (choosenum == 1)
{
Dobavi(kolko);
}
else if (choosenum == 2)
{
Iztrii();
}
else if (choosenum == 3)
{
Showallstudents(name,kolko);
}
else if (choosenum == 4)
{
Searchastudent();
}
else if (choosenum == 5)
{
Exit();
break;
}
}
}
static public void Dobavi(int kolko)
{
Console.WriteLine("You have entered the option to add a student.");
string[] name = new string[kolko];
for (int i = 0; i < kolko; i++)
{
Console.Write("Insert a name: ");
name[i] = Console.ReadLine();
}
}
static void Iztrii()
{
Console.WriteLine("You have entered the option to delete a student.");
}
static void Showallstudents(string [] name, int kolko)
{
Console.WriteLine("You have entered the option to show all of the students.");
Console.WriteLine("Loading Database....");
Console.WriteLine("Loading Database...");
for (int i = 0; i < name.Length; i++)
{
Console.WriteLine("Showing Student " + i + " info: " + name[i]);
}
}
static void Searchastudent()
{
Console.WriteLine("You have entered the option to search between all of the students.");
int number;
}
static void Exit()
{
Console.WriteLine("Bye! Do not forget to send greetings to the DJ and Junior Tours!");
}
/*static void uchenici(string[]name, int a)
{
for (int i = 0; i<name.Length; i++)
{
name[i] = Console.ReadLine();
}
}*/
}
}