int minutesIn(int totalSeconds) {
    return totalSeconds / 60;
}

int secondsLeft(int totalSeconds) {
    return totalSeconds % 60;
}

void main() {
    int total = 500;
    IO.println(minutesIn(total) + " minutes and " + secondsLeft(total) + " seconds");
}

// From Groundwork, chapter 6 (ch06-methods), box 10.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch06_10.java
