i am trying to mod my input
but i got an error :
invalid operands of types 'double' and 'int' to binary 'operator%'
i would also like to noe top/60 how do i not show the remainder.
i am using dev c++
this is my code :
int main()
{
double DriverLapTime[3][3] = {};
double minutes, seconds;
string WheelSet[3] = {"Bridgestone","Michelin","Dunlop"};
for (int i = 0; i < 3; i++) {
cout << "Lap time for driver " << i+1 << endl;
for (int j = 0; j < 3; j++) {
cout << "Lap 1 (Wheel Set " << j+1 << ") : ";
cin >> minutes >> seconds;
DriverLapTime[i][j] = (minutes * 60) + seconds; }
cout << endl;
}
cout << fixed << setprecision(2);
top = DriverLapTime[0][0];
for (int a = 0; a < 3; a++)
for (int b = 0; b < 3; b++)
if ( DriverLapTime[a][b] > top )
top = DriverLapTime[a][b];
cout << top / 60 << " minutes " << top % 60 << " seconds ";
return 0;
}