Question: write a C program that does the follwing: Declare a structure called date with the following fields: day, month, year. define a new date type
write a C program that does the follwing:
Declare a structure called date with the following fields: day, month, year.
define a new date type date_t for the struture date.
Read a valid date from the user(validity requirments are defined below). If the date is invalid, keep requesting the input until a valid date is entred.
print the date in following format: dd-mm-yyyy

A3. (30 marks) Write a program that does the following: . Declare a structure called date with the following fields: day, month, year. Define a new data type date_t for the structure date. Read a valid date from the user (validity requirements are defined below). If the date is invalid, keep requesting the input until a valid date is entered. Print the date in the following format: DD-MM-YYYY . A date is valid only if the value of the day is within the range 1 to 31 (inclusive), month within the range 1 to 12 (inclusive), and year within the range 1 800 t o 2017 (inclusive), NOTE: you will be assessed on the functionality and the coding style
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
