Program to find the time remaining for the day to complete | Java program to Number of pairs of lines having integer intersection points ; Function to find the remaining time ; Formula for total remaining minutes = 1440 - 60 h - m ; Remaining hours ; Remaining minutes ; Driver code ; Current time ; Get the remaining time
class GFG { static void remainingTime ( int h , int m ) { int totalMin , hoursRemaining , minRemaining ; totalMin = 1440 - 60 * h - m ; hoursRemaining = totalMin / 60 ; minRemaining = totalMin % 60 ; System . out . print ( hoursRemaining + " : : " + minRemaining + "NEW_LINE"); } public static void main ( String [ ] args ) { int h = 0 , m = 1 ; remainingTime ( h , m ) ; } }