Loading
Home › Computer Science Help › Create a function called "greeting" that takes no paramet...
Status: Completed

Create a function called "greeting" that takes no parameters and prints either Good Morning, Good Afternoon or Good Evening depending on the time of day (1:00am- 10:59am is Morning, 11:00-4:59 is afternoon and after 5:00 is evening). You will need to use some type of if-else statement or case statement to make the choice for the greeting. Use the date function to return the current hour of the day in 24hr format (tod= date(G))

Date Posted: 26/11/2012
Category: Computer Science
Due Date: 10/12/2012
Instruction
Create a function called "greeting" that takes no parameters and prints either Good Morning, Good Afternoon or Good Evening depending on the time of day (1:00am- 10:59am is Morning, 11:00-4:59 is afternoon and after 5:00 is evening). You will need to use some type of if-else statement or case statement to make the choice for the greeting. Use the date function to return the current hour of the day in 24hr format (tod= date(G))
Attached
No File uploaded yet.
Bidders
partha1022 13 years, 10 months ago
earned 825.00 around 16 assignments.
I have an experience of 3 years in programming. I can do this for you. In which language do you want this.
$15.00
  • I can do this in 30 mins.
    User_2550 | Nov 26, 2012, 11:41 AM
  • PHP inside an html page
    User_2619 | Nov 26, 2012, 12:12 PM
  • when do you need the assignment ??
    User_2550 | Nov 26, 2012, 21:03 PM
  • Assignment complete. In case of any concerns please message me.
    User_2550 | Nov 27, 2012, 07:41 AM
  • Thanks for doing this so fast but neither one is returning anything to the browser. Just a blank page.
    User_2619 | Nov 27, 2012, 11:34 AM
  • ohh .. you need a html page.. and a web server to run that page. I will make the html page for you :)
    User_2550 | Nov 27, 2012, 11:40 AM
  • I have made those into html (php) pages , you can upload them to a web server to view the output. Either you can install apache tomcat/ microsoft IIS in you PC to create a web server or you can register on any free web hosting sites and upload the pages to view the result. I have uploaded them to my test web server, you can see the output below. http://partha1022.byethost16.com/html/ifelse.php http://partha1022.byethost16.com/html/switch.php
    User_2550 | Nov 27, 2012, 21:21 PM
  • Perfect! Thank you. I have a couple more if you are interested.
    User_2619 | Nov 28, 2012, 06:02 AM
  • yes, looking forward for some more assignments from you.
    User_2550 | Nov 28, 2012, 06:34 AM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}