From 0f10a88a6b373f5569e664a3963207bc0f4bc153 Mon Sep 17 00:00:00 2001 From: lensferno Date: Thu, 31 Mar 2022 19:28:41 +0800 Subject: [PATCH] =?UTF-8?q?...=E4=B8=8D=E7=9F=A5=E9=81=93=E8=AF=B4?= =?UTF-8?q?=E4=BB=80=E4=B9=88=202022.03.31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pure-c-test/20220331/test2-4.c | 25 +++++++++++++++++++ pure-c-test/20220331/text2-2.c | 23 +++++++++++++++++ work20220330/{ => t3}/.idea/.gitignore | 0 work20220330/{ => t3}/.idea/deployment.xml | 0 work20220330/{ => t3}/.idea/misc.xml | 0 work20220330/t3/.idea/modules.xml | 8 ++++++ .../work20220330.iml => t3/.idea/t3.iml} | 0 work20220330/t3/.idea/vcs.xml | 6 +++++ work20220330/t3/CMakeLists.txt | 6 +++++ work20220330/t3/main.cpp | 6 +++++ work20220330/t4/.idea/.gitignore | 8 ++++++ work20220330/t4/.idea/.name | 1 + work20220330/t4/.idea/deployment.xml | 14 +++++++++++ work20220330/{ => t4}/.idea/encodings.xml | 0 work20220330/t4/.idea/misc.xml | 4 +++ work20220330/{ => t4}/.idea/modules.xml | 0 work20220330/{ => t4}/.idea/vcs.xml | 1 + work20220330/t4/.idea/work20220330.iml | 2 ++ work20220330/{ => t4}/CMakeLists.txt | 0 work20220330/{ => t4}/DbTeacher.cpp | 0 work20220330/{ => t4}/DbTeacher.h | 0 work20220330/{ => t4}/Leader.cpp | 0 work20220330/{ => t4}/Leader.h | 0 work20220330/{ => t4}/Staff.cpp | 0 work20220330/{ => t4}/Staff.h | 0 work20220330/{ => t4}/Teacher.cpp | 0 work20220330/{ => t4}/Teacher.h | 0 work20220330/{ => t4}/date/Date.cpp | 0 work20220330/{ => t4}/date/Date.h | 0 work20220330/{ => t4}/main.cpp | 0 30 files changed, 104 insertions(+) create mode 100644 pure-c-test/20220331/test2-4.c create mode 100644 pure-c-test/20220331/text2-2.c rename work20220330/{ => t3}/.idea/.gitignore (100%) rename work20220330/{ => t3}/.idea/deployment.xml (100%) rename work20220330/{ => t3}/.idea/misc.xml (100%) create mode 100644 work20220330/t3/.idea/modules.xml rename work20220330/{.idea/work20220330.iml => t3/.idea/t3.iml} (100%) create mode 100644 work20220330/t3/.idea/vcs.xml create mode 100644 work20220330/t3/CMakeLists.txt create mode 100644 work20220330/t3/main.cpp create mode 100644 work20220330/t4/.idea/.gitignore create mode 100644 work20220330/t4/.idea/.name create mode 100644 work20220330/t4/.idea/deployment.xml rename work20220330/{ => t4}/.idea/encodings.xml (100%) create mode 100644 work20220330/t4/.idea/misc.xml rename work20220330/{ => t4}/.idea/modules.xml (100%) rename work20220330/{ => t4}/.idea/vcs.xml (70%) create mode 100644 work20220330/t4/.idea/work20220330.iml rename work20220330/{ => t4}/CMakeLists.txt (100%) rename work20220330/{ => t4}/DbTeacher.cpp (100%) rename work20220330/{ => t4}/DbTeacher.h (100%) rename work20220330/{ => t4}/Leader.cpp (100%) rename work20220330/{ => t4}/Leader.h (100%) rename work20220330/{ => t4}/Staff.cpp (100%) rename work20220330/{ => t4}/Staff.h (100%) rename work20220330/{ => t4}/Teacher.cpp (100%) rename work20220330/{ => t4}/Teacher.h (100%) rename work20220330/{ => t4}/date/Date.cpp (100%) rename work20220330/{ => t4}/date/Date.h (100%) rename work20220330/{ => t4}/main.cpp (100%) diff --git a/pure-c-test/20220331/test2-4.c b/pure-c-test/20220331/test2-4.c new file mode 100644 index 0000000..26ab422 --- /dev/null +++ b/pure-c-test/20220331/test2-4.c @@ -0,0 +1,25 @@ +#include + +int main() { + int score = 0; + + scanf("%d", &score); + + int level = score / 10; + switch (level) { + case 10: + case 9: + printf("甲等"); + break; + case 8: + printf("乙等"); + break; + case 7: + printf("丙等"); + break; + default: + printf("没有奖金~"); + break; + } + +} \ No newline at end of file diff --git a/pure-c-test/20220331/text2-2.c b/pure-c-test/20220331/text2-2.c new file mode 100644 index 0000000..4e7d45d --- /dev/null +++ b/pure-c-test/20220331/text2-2.c @@ -0,0 +1,23 @@ +#include +#define PI 3.1415926 +int main() { + double x = 0.0, y = 0.0, z = 0.0; + + scanf("%lf", &x); + + if (x <= 2.5) { + y = x*x - 1; + } else { + y = x*x - 1; + } + + if (x < 0) { + z = -PI/2.0 + 3.0; + } else if (x == 0) { + z = 0; + } else { + z = PI/2.0 - 5.0; + } + + printf("y=%lf, z=%lf", y, z); +} \ No newline at end of file diff --git a/work20220330/.idea/.gitignore b/work20220330/t3/.idea/.gitignore similarity index 100% rename from work20220330/.idea/.gitignore rename to work20220330/t3/.idea/.gitignore diff --git a/work20220330/.idea/deployment.xml b/work20220330/t3/.idea/deployment.xml similarity index 100% rename from work20220330/.idea/deployment.xml rename to work20220330/t3/.idea/deployment.xml diff --git a/work20220330/.idea/misc.xml b/work20220330/t3/.idea/misc.xml similarity index 100% rename from work20220330/.idea/misc.xml rename to work20220330/t3/.idea/misc.xml diff --git a/work20220330/t3/.idea/modules.xml b/work20220330/t3/.idea/modules.xml new file mode 100644 index 0000000..f402c1f --- /dev/null +++ b/work20220330/t3/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/work20220330/.idea/work20220330.iml b/work20220330/t3/.idea/t3.iml similarity index 100% rename from work20220330/.idea/work20220330.iml rename to work20220330/t3/.idea/t3.iml diff --git a/work20220330/t3/.idea/vcs.xml b/work20220330/t3/.idea/vcs.xml new file mode 100644 index 0000000..c8ade07 --- /dev/null +++ b/work20220330/t3/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/work20220330/t3/CMakeLists.txt b/work20220330/t3/CMakeLists.txt new file mode 100644 index 0000000..d76855f --- /dev/null +++ b/work20220330/t3/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.21) +project(t3) + +set(CMAKE_CXX_STANDARD 14) + +add_executable(t3 main.cpp) diff --git a/work20220330/t3/main.cpp b/work20220330/t3/main.cpp new file mode 100644 index 0000000..bc8f460 --- /dev/null +++ b/work20220330/t3/main.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout << "Hello, World!" << std::endl; + return 0; +} diff --git a/work20220330/t4/.idea/.gitignore b/work20220330/t4/.idea/.gitignore new file mode 100644 index 0000000..1c2fda5 --- /dev/null +++ b/work20220330/t4/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/work20220330/t4/.idea/.name b/work20220330/t4/.idea/.name new file mode 100644 index 0000000..af254fa --- /dev/null +++ b/work20220330/t4/.idea/.name @@ -0,0 +1 @@ +work20220330 \ No newline at end of file diff --git a/work20220330/t4/.idea/deployment.xml b/work20220330/t4/.idea/deployment.xml new file mode 100644 index 0000000..771f492 --- /dev/null +++ b/work20220330/t4/.idea/deployment.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/work20220330/.idea/encodings.xml b/work20220330/t4/.idea/encodings.xml similarity index 100% rename from work20220330/.idea/encodings.xml rename to work20220330/t4/.idea/encodings.xml diff --git a/work20220330/t4/.idea/misc.xml b/work20220330/t4/.idea/misc.xml new file mode 100644 index 0000000..f1c67df --- /dev/null +++ b/work20220330/t4/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/work20220330/.idea/modules.xml b/work20220330/t4/.idea/modules.xml similarity index 100% rename from work20220330/.idea/modules.xml rename to work20220330/t4/.idea/modules.xml diff --git a/work20220330/.idea/vcs.xml b/work20220330/t4/.idea/vcs.xml similarity index 70% rename from work20220330/.idea/vcs.xml rename to work20220330/t4/.idea/vcs.xml index 2e3f692..3f1db62 100644 --- a/work20220330/.idea/vcs.xml +++ b/work20220330/t4/.idea/vcs.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/work20220330/t4/.idea/work20220330.iml b/work20220330/t4/.idea/work20220330.iml new file mode 100644 index 0000000..6d70257 --- /dev/null +++ b/work20220330/t4/.idea/work20220330.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/work20220330/CMakeLists.txt b/work20220330/t4/CMakeLists.txt similarity index 100% rename from work20220330/CMakeLists.txt rename to work20220330/t4/CMakeLists.txt diff --git a/work20220330/DbTeacher.cpp b/work20220330/t4/DbTeacher.cpp similarity index 100% rename from work20220330/DbTeacher.cpp rename to work20220330/t4/DbTeacher.cpp diff --git a/work20220330/DbTeacher.h b/work20220330/t4/DbTeacher.h similarity index 100% rename from work20220330/DbTeacher.h rename to work20220330/t4/DbTeacher.h diff --git a/work20220330/Leader.cpp b/work20220330/t4/Leader.cpp similarity index 100% rename from work20220330/Leader.cpp rename to work20220330/t4/Leader.cpp diff --git a/work20220330/Leader.h b/work20220330/t4/Leader.h similarity index 100% rename from work20220330/Leader.h rename to work20220330/t4/Leader.h diff --git a/work20220330/Staff.cpp b/work20220330/t4/Staff.cpp similarity index 100% rename from work20220330/Staff.cpp rename to work20220330/t4/Staff.cpp diff --git a/work20220330/Staff.h b/work20220330/t4/Staff.h similarity index 100% rename from work20220330/Staff.h rename to work20220330/t4/Staff.h diff --git a/work20220330/Teacher.cpp b/work20220330/t4/Teacher.cpp similarity index 100% rename from work20220330/Teacher.cpp rename to work20220330/t4/Teacher.cpp diff --git a/work20220330/Teacher.h b/work20220330/t4/Teacher.h similarity index 100% rename from work20220330/Teacher.h rename to work20220330/t4/Teacher.h diff --git a/work20220330/date/Date.cpp b/work20220330/t4/date/Date.cpp similarity index 100% rename from work20220330/date/Date.cpp rename to work20220330/t4/date/Date.cpp diff --git a/work20220330/date/Date.h b/work20220330/t4/date/Date.h similarity index 100% rename from work20220330/date/Date.h rename to work20220330/t4/date/Date.h diff --git a/work20220330/main.cpp b/work20220330/t4/main.cpp similarity index 100% rename from work20220330/main.cpp rename to work20220330/t4/main.cpp