Algo for comparing more than 2 elements! LImits header for Float value;

1.bool comp(int a, int b)
{
 return (a < b);
}

2.car :: show()
{
    float mini = numeric_limits<float>::max();
    cout << "Brand Name : " << brand << endl;
    for(i=0;i<3;i++)
    {
        cout << "lap " << i+1 << ": " << laps[i] << endl;
        if(laps[i]< mini)
        {
           mini = laps[i];
        }
    }
    cout << "Minimum Lap Time : " << mini << endl;
}

Comments