Sam and Riya are fond of the "Delicious" restaurant. Sam will have his dinner in that restaurant on every 'i'th day. Riya will have her dinner on every 'j'th day. Find the day on which Sam and Riya will have their dinner together in that restaurant. When a day is less than or equal to zero, then display "<'i'th> to <'j'th> is not a valid interval".
Hint: Find out the LCM for given inputs.
Sample Input 1:
Enter the day interval of Sam
4
Enter the day interval of Riya
6
Sample Output 1:
Sam and Riya will have their dinner on day 12
Sample Input 2:
Enter the day interval of Sam
6
Enter the day interval of Riya
8
Sample Output 2:
Sam and Riya will have their dinner on day 24
Sample Input 3:
Enter the day interval of Sam:
-4
Enter the day interval of Riya:
6
Sample Output 3:
-4 to 6 is not a valid interval
Answers
Answered by
9
Answer:
plz thank my answers and follow back dear
Answered by
10
Answer:
The climate of Mahabaleshwar is cool due to the fact that is located on ranges of sahyadri to the east of Gati . The heavy forest cover dictates the climate of the region since water evaporates to the atmosphere to form rainfall hence the region is generally cool to bring down rainfall.
Similar questions