Get reliable answers to your questions at Westonci.ca, where our knowledgeable community is always ready to help. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.
Sagot :
A program noonsnooze.java that takes an integer command-line argument snooze and prints the time of day (using a 12-hour clock) that is snooze minutes after 12:00pm (noon) is given below:
The Code
public class NoonSnooze
{
public static void main(String[] args)
{
int snooze = Integer.parseInt(args[0]);
int hour = 12 + (snooze / 60);
int minutes = 00 + snooze % 60;
String ampm;
if(hour%24 < 12) ampm="pm";
else ampm="am";
hour=hour%12;
if (hour==00) hour=12;
String time = hour + ":" + minutes + " " + ampm;
System.out.println(time);
}
}
Read more about programming here:
https://brainly.com/question/23275071
#SPJ1
We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Thanks for using our platform. We aim to provide accurate and up-to-date answers to all your queries. Come back soon. Discover more at Westonci.ca. Return for the latest expert answers and updates on various topics.