Calculate the IST : Indian Standard Time | Java implementation of the approach ; Function to calculate Indian Standard Time ; Separate integer part ; Separate float part and return ceil value ; Driver code ; Number of hours ( 1 - 24 ) ; Rotations in degrees
import java . math . * ; class GFG { public static void cal_IST ( int h , double r ) { double IST = ( h * r * 1.0 ) / 360 ; int int_IST = ( int ) IST ; int float_IST = ( int ) Math . ceil ( ( int ) ( ( IST - int_IST ) * 60 ) ) ; System . out . println ( int_IST + " : " + float_IST ) ; } public static void main ( String [ ] args ) { int h = 20 ; double r = 150 ; cal_IST ( h , r ) ; } }