Usage Modulo: How Many Hours In Addition To Minutes Are At That Spot Inward In Addition To Then Many Minutes?
x%y is defined equally the balance of the sectionalization x/y. You tin role modulo to notice the minutes as well as hours inward as well as hence many minutes.
Let us nation nosotros bring a cconversion practise to convert 123490 minutes into minutes as well as hours.
By long mitt nosotros would produce this:
123490/60 as well as notice the remainder
We drib dead 2058.1666666667 alongside 0.1666666667 hours converts to 10
That is 2058 hours as well as ten minutes.
We tin produce the same using modulo equally shown.
OR
You tin role a much shorter code equally shown here: (note input information has changed to 1234901)
Let us nation nosotros bring a cconversion practise to convert 123490 minutes into minutes as well as hours.
By long mitt nosotros would produce this:
123490/60 as well as notice the remainder
We drib dead 2058.1666666667 alongside 0.1666666667 hours converts to 10
That is 2058 hours as well as ten minutes.
We tin produce the same using modulo equally shown.
You tin role a much shorter code equally shown here: (note input information has changed to 1234901)
Komentar
Posting Komentar