我仍处于学习阶段,C#
我的程序需要一些帮助。
我的程序应该是这样工作的,我有 6 个推销员,我会在控制台中写下关于他们的信息(name, sold items etc)
。我怎样才能让它循环 6 次(每个销售员一个)?
for (int i = 0; i < 6; i++) (Couldn't come up with more than this)
{
salesmen[] seller = new salesmen[6];
//Salesmen name
Console.WriteLine("Enter name: ");
salesmen[0].namn = System.Console.ReadLine();
//Birth certificate
Console.WriteLine("Enter birth certificate: ");
salesmen[0].birthvertificate = Console.ReadLine();
//Enter district
Console.WriteLine("Enter district: ");
salesmen[0].district = Console.ReadLine();
//Enter solditems
Console.WriteLine("Enter solditems: ");
salesmen[0].solditems = int.Parse(Console.ReadLine());
//Calculates what level each salesmen has reached
if (salesmen[0].solditems < 50)
salesmen[0].level = 1;
if (salesmen[0].solditems >= 50 && salesmen[0].solitems < 99)
salesmen[0].level = 2;
if (salesmen[0].solitems >= 100 && salesmen[0].solditems < 199)
salesmen[0].level = 3;
if (salesmen[0].solditems > 199)
salesmen[0].level = 4;