i have an assignment in my computer science class. i have to write a program that takes in the expiration date of a food product, the current date, and tells whether or not the product is expired or not.
i have to use 3 bool functions ( 'isvalid' returns if a date is valid, has parameters that represent one date) ( 'thesame' tells if the two dates are the same, has parameters that represent two dates) ( 'earlier' returns true if the first date is earlier than the second date and false otherwise, has parameters that represent two dates) and a void function ( 'output_date' which takes parameters that represent one date and outputs it to the screen)
here is the output:
Enter expiration date in the form mm/dd/yyyy: 2/1/2017
Enter today's date in the form mm/dd/yyyy: 2/15/2013
The expiration date you entered is 2/01/2017
The current date you entered is 2/15/2013
The expiration date is later than today, this food is ok!
i just need help writing a bool function. idk how to make one
2007-03-19
10:17:24
·
4 answers
·
asked by
63godtoh
3