Курсовая работа: Определение срока поломки компьютера
i=s->IndexOf(" ");
dd=s->Substring(0,i);
if (dd==modelPower)
{ s=s->Substring(i+1,s->Length-dd->Length-1);
i=s->IndexOf("\n");
String ^p=s->Substring(0,i);
timeWork2_int=Int32::Parse(p);
timePower=timeWork2_int;
k++; }
}
int j=s->IndexOf("\n");
s=s->Substring(j+1,s->Length-j-1);
}
}
//Определение наименьшего срока службы у выранных комплектующих
if ((timeCPU<timeMB)&(timeCPU<timeHDD)&(timeCPU<timeVideo)&(timeCPU<timeOZY)&(timeCPU<timeDisp)&(timeCPU<timePower))
{ this->textBox1->Text="Центральный процессор";
timeWork=timeCPU;}
if ((timeMB<timeCPU)&(timeMB<timeHDD)&(timeMB<timeVideo)&(timeMB<timeOZY)&(timeMB<timeDisp)&(timeMB<timePower))
{this->textBox1->Text="Материнская плата";
timeWork=timeMB;}
if ((timeHDD<timeCPU)&(timeHDD<timeMB)&(timeHDD<timeVideo)&(timeHDD<timeOZY)&(timeHDD<timeDisp)&(timeHDD<timePower))
{ this->textBox1->Text="Жесткий диск";
timeWork=timeHDD;}
if ((timeVideo<timeCPU)&(timeVideo<timeHDD)&(timeVideo<timeMB)&(timeVideo<timeOZY)&(timeVideo<timeDisp)&(timeVideo<timePower))
{ this->textBox1->Text="Видеокарта";
timeWork=timeVideo;}
if ((timeOZY<timeCPU)&(timeOZY<timeHDD)&(timeOZY<timeMB)&(timeOZY<timeVideo)&(timeOZY<timeDisp)&(timeOZY<timePower))
{ this->textBox1->Text="Оперативная память";