From 407877de30bc1712f1c71e0735950984b6c8bd60 Mon Sep 17 00:00:00 2001 From: Luthics Date: Sun, 19 Feb 2023 13:49:23 +0800 Subject: [PATCH] 1-2 --- .gitignore | 2 ++ .vscode/settings.json | 6 ++++++ 1/1.c | 9 +++++++++ 1/2.c | 19 +++++++++++++++++++ 1/3.c | 19 +++++++++++++++++++ README.md | 1 + 6 files changed, 56 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 1/1.c create mode 100644 1/2.c create mode 100644 1/3.c create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f374d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*/tempCodeRunnerFile.* +*/*.exe \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..194ffa4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "C_Cpp.clang_format_style": "{ BasedOnStyle: Chromium, UseTab: Never, IndentWidth: 4, TabWidth: 4, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }", + "files.associations": { + "stdio.h": "c" + } +} \ No newline at end of file diff --git a/1/1.c b/1/1.c new file mode 100644 index 0000000..f879cb4 --- /dev/null +++ b/1/1.c @@ -0,0 +1,9 @@ +#include + +int main() { + printf(" 1.Input\n"); + printf(" 2.Output\n"); + printf(" 3.Order\n"); + printf(" 4.Quit"); + return 0; +} \ No newline at end of file diff --git a/1/2.c b/1/2.c new file mode 100644 index 0000000..6381329 --- /dev/null +++ b/1/2.c @@ -0,0 +1,19 @@ +#include + +int main() { + // printf(" 1.Input\n"); + // printf(" 2.Output\n"); + // printf(" 3.Order\n"); + // printf(" 4.Quit\n"); + char m; + scanf("%c", &m); + if (m == 'I') + printf("You are trying to input info"); + else if (m == 'O') + printf("You are trying to output info"); + else if (m == 'D') + printf("You are trying to make things ordered"); + else if (m == 'Q') + printf("You are about to quit"); + return 0; +} \ No newline at end of file diff --git a/1/3.c b/1/3.c new file mode 100644 index 0000000..6381329 --- /dev/null +++ b/1/3.c @@ -0,0 +1,19 @@ +#include + +int main() { + // printf(" 1.Input\n"); + // printf(" 2.Output\n"); + // printf(" 3.Order\n"); + // printf(" 4.Quit\n"); + char m; + scanf("%c", &m); + if (m == 'I') + printf("You are trying to input info"); + else if (m == 'O') + printf("You are trying to output info"); + else if (m == 'D') + printf("You are trying to make things ordered"); + else if (m == 'Q') + printf("You are about to quit"); + return 0; +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..35ca9af --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# 2023春程序设计基础(吴茜媛)-Moodle