Note 2.7.1.
In C++, floating-points are declared as type
double
. We’ll get to that in the next chapter.
+
.
1 + 1
hour - 1
hour * 60 + minute
minute / 60
cout << "Percentage of the hour that has passed: ";
cout << minute * 100 / 60 << endl;
Percentage of the hour that has passed: 98
double
. We’ll get to that in the next chapter.