Xiang
06-08-2003, 03:13 PM
Dear sir,
Refers to the below coding.
Int day; mon, year;
Printf(“Date of received: dd-mm-yyy”)
Scanf(“%02d-%02d-%4d, &day, &mon, &year);
How can I control the validation of the date? For example, in the month of February, I want to control the maximum day is 28 days, otherwise the error message will be displayed on the screen and user have to re-enter a valid day or month. How is the coding I should use?
Thanks,
Xiang
Refers to the below coding.
Int day; mon, year;
Printf(“Date of received: dd-mm-yyy”)
Scanf(“%02d-%02d-%4d, &day, &mon, &year);
How can I control the validation of the date? For example, in the month of February, I want to control the maximum day is 28 days, otherwise the error message will be displayed on the screen and user have to re-enter a valid day or month. How is the coding I should use?
Thanks,
Xiang