about | help | code help+videos | done | prefs |
Write a method that accepts three parameters: 'hours' indicates the hours and will be in the range 1<=hours<=12; 'minutes' indicates the minutes and will be in the range 0<=minutes<=59; 'AM' is true if it is AM and false if it is PM. Return a string to represent the current time in the format shown in the test data. As preconditions you may assume that all the input parameters meet the criteria established above. quiz2021_12_08_APSLHL_time(5, 55, true) → "5:55 AM" quiz2021_12_08_APSLHL_time(11, 1, true) → "11:01 AM" quiz2021_12_08_APSLHL_time(6, 8, false) → "6:08 PM" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 230
Copyright Nick Parlante 2017 - privacy