Menu
Question Index
...


Write a program to identify the time when the two bells will ring together next. The time when they have last rung together and their ringing frequencies are given.

Input (String, int, int) Output (String)
Jan 19 2013 09:55, 2, 10 Jan 19 2013 10:05
Nov 14 2015 23:20, 16, 34 Nov 15 2015 03:52
Jan 25 2009 11:25, 10, 5 Jan 25 2009 11:35
Jun 19 2011 17:55, 18, 24 Jun 19 2011 19:07

class CommonRingingTimeOfTwoBells

{    public static void main(String s[])
    {
        System.out.println("Next common ringing time is : " + getCommonRingingTime("Jan 19 2013 09:55", 2, 10));

    }


public static String getCommonRingingTime(String lastRungTime, int firstFrequency, int secondFrequency) {
String result = null;
//Write code here to get the time when they will ring together next and assign to result.
return result;
}
//If required write any additional methods here.
}

Doubts

Problems

Topic: Locale Class In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App