class product
{
private void start(int year)
{
tu t = new tu();
for (int i = 0; i < year * 2; i++)
{
tu.tus.ForEach(m => m.produce());
}
MessageBox.Show(tu.tus.Count.ToString());
}
}
class tu
{
public static List<tu> tus = new List<tu>();
public double age { get; set; }
public tu() { age = 0; tus.Add(this); }
public void produce()
{
age += 0.5;
if (age > 1 && age <= 5) { new tu(); }
if (age == 6) { tus.Remove(this); }
}
&nb