In this code I have defined the remainder in this code as float data type but the compiler rejected that and suppose to defien it as an inegral type what is the reasone for this issue? enter image description here
int main()
{
float days, hours, minutes, seconds;
float Totalseconds;
float Remainder;
float secondsperday;
float secondsperhour;
float secondsperminute;
secondsperday = 24 * 60 * 60;
secondsperhour = 60 * 60;
secondsperminute = 60;
cout << "Enter total seconds\n";
cin >> Totalseconds;
days = floor(Totalseconds / secondsperday);
Remainder = (Totalseconds % secondsperday);
hours = floor(Remainder / secondsperhour);
Remainder = Remainder % secondsperhour;
minutes = floor(Remainder / secondsperminute);
Remainder = Remainder % secondsperminute;
seconds = Remainder;
cout << days << ":" << hours << ":" << minutes << ":" << seconds;
return 0;
}