Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Date 日期格式转换器_Date_Format_Converter - Fatal编程技术网

Date 日期格式转换器

Date 日期格式转换器,date,format,converter,Date,Format,Converter,intmonth1,day1,year1,month2,day2,year2 printf("Enter a date in the form mm-dd-yy: "); scanf("%d%*c%d%*c%d", &month1, &day1, &year1) printf(" %02d / %02d / %02d\n\n", month1, day1, year1); printf("Enter a date in the form mm/dd/yy:

int
month1
day1
year1
month2
day2
year2

printf("Enter a date in the form mm-dd-yy:  ");

scanf("%d%*c%d%*c%d",  &month1, &day1, &year1)

printf(" %02d / %02d  /  %02d\n\n", month1, day1, year1);

printf("Enter a date in the form mm/dd/yy:  ");

scanf("%d%*c%d%*c%d", &month2, &day2, &year2);

printf("month = %02d  day  =  %02d   year  =  %02d\n", month2, day2, year2)

必须制作一个日期转换器,使其变得简单,但很难转换为像jan-feb等字符,任何提示都会被告知

当你使用大写字母或者三个字母而不是两个字母时,提示会发生变化

试试看:嗯