From f9b89bdf82be5fbddedf5d00e9525e2d368e2207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E8=BF=9B=E9=80=B8?= <15819740+flurocy@user.noreply.gitee.com> Date: Sun, 1 Jun 2025 15:58:19 +0800 Subject: [PATCH 1/4] testing --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..25f3991 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +This is just a test. \ No newline at end of file -- Gitee From 7d02427e275e3d52748b5cbe0037e5fd911adec3 Mon Sep 17 00:00:00 2001 From: lihaoxuan Date: Mon, 2 Jun 2025 15:52:11 +0800 Subject: [PATCH 2/4] test --- text.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 text.txt diff --git a/text.txt b/text.txt new file mode 100644 index 0000000..273c1a9 --- /dev/null +++ b/text.txt @@ -0,0 +1 @@ +This is a test. \ No newline at end of file -- Gitee From 286e94b7eba2d062bcca00b33a71d83f4bb6e1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8A=E8=BD=A9?= <15817088+li-hao-xuan846@user.noreply.gitee.com> Date: Mon, 2 Jun 2025 11:24:47 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20test?= =?UTF-8?q?.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index 25f3991..0000000 --- a/test.txt +++ /dev/null @@ -1 +0,0 @@ -This is just a test. \ No newline at end of file -- Gitee From 64ccb7b3ea25927b25acff26bda2b38e0cb0b10d Mon Sep 17 00:00:00 2001 From: Juicy <15804151+Juicy666@user.noreply.gitee.com> Date: Mon, 2 Jun 2025 19:25:08 +0800 Subject: [PATCH 4/4] pr file --- first_pr.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 first_pr.txt diff --git a/first_pr.txt b/first_pr.txt new file mode 100644 index 0000000..13081e4 --- /dev/null +++ b/first_pr.txt @@ -0,0 +1,52 @@ +#include +#include +#include +#include + +int main() +{ + char continue_flag = 'Y'; + char input_buffer[1024]; + + while (continue_flag == 'Y' || continue_flag == 'y') + { + printf("please input filenames: "); + fgets(input_buffer, sizeof(input_buffer), stdin); + input_buffer[strcspn(input_buffer, "\n")] = '\0'; // 移除换行符 + + // 处理多个文件名(支持逗号或空格分隔) + char *filename = strtok(input_buffer, ", "); + int first_file = 1; + + while (filename != NULL) + { + double digit; + pgm_to_matrix(filename, 28, 28, (double[28][28]){0}); // 初始化矩阵 + + // 调用识别函数 + recognize_digit(filename, &digit); + + // 输出结果 + if (first_file) + { + printf("%s: %.0f", filename, digit); + first_file = 0; + } + else + { + printf(", %s: %.0f", filename, digit); + } + + filename = strtok(NULL, ", "); + } + printf("\n"); + + // 检查是否继续 + printf("do you want to continue? please input [Y or N]: "); + scanf(" %c", &continue_flag); + getchar(); // 消耗缓冲区残留字符 + } + + printf("Bye\n"); + return 0; +} \ No newline at end of file -- Gitee