The script that Andy would want to use is Javascript, here is the source code: document.getElementById("para1").innerHTML = formatAMPM();
function formatAMPM() {var d = new Date(), minutes = d.getMinutes().toString().length == 1 ? '0'+d.getMinutes() : d.getMinutes(), hours = d.getHours().toString().length == 1 ? '0'+d.getHours() : d.getHours(), ampm = d.getHours() >= 12 ? 'pm' : 'am', months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];return days[d.getDay()]+' '+months[d.getMonth()]+' '+d.getDate()+' '+d.getFullYear()+' '+hours+':'+minutes+ampm;<span>}
The HTML code needed to call this Javascript on his website is this: </span><span><div id="para1"></div>
</span>
You could call the Javascript up using PHP.
Hope this helps! Good luck! :)
Answer: you cant
Explanation:
you can not delete a question. Have a good day
Answer:
Explanation:
There are two loops in the given code snippet:
1. Both the loops are nested
2. The outer loop which is for loop is running n number of times linearly.
3. The inner loop which is while loop is jumping in the power of 2, which makes it run log n number of times.
So the overall complexity of the code will be= n * log n
Time complexity(or upper bound)= O(n log n).
Hit the thumbs up if you liked the answer. :)