From a44786b2b11f7832d5b12916ea40e085b3fe5cbc Mon Sep 17 00:00:00 2001 From: qq_39446688 <2252334095@qq.com> Date: Thu, 24 Sep 2020 00:13:19 +0800 Subject: [PATCH] Add new file --- 3-1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 3-1 diff --git a/3-1 b/3-1 new file mode 100644 index 0000000..45d9494 --- /dev/null +++ b/3-1 @@ -0,0 +1,20 @@ +#include +#include +int main() +{ + int mth; + int day; + int yar; + char a; + char b; + scanf("%d%c%d%c%d", &mth, &a, &day, &b, &yar); + if (mth >= 10 && day >= 10) + printf("You entered the date%d%d%d", yar, mth, day); + else if (mth >= 10 && day < 10) + printf("You entered the date%d%d0%d", yar, mth, day); + else if (mth < 10 && day < 10) + printf("You entered the date%d0%d0%d", yar, mth, day); + else if (mth < 10 && day >= 10) + printf("You entered the date%d0%d%d", yar, mth, day); + return 0; +} \ No newline at end of file -- GitLab