From b457f5a7f577e395c74ddc79ebceb5789df28037 Mon Sep 17 00:00:00 2001 From: xianya Date: Fri, 27 Dec 2024 17:57:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20main.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 main.c diff --git a/main.c b/main.c new file mode 100644 index 0000000..faa38da --- /dev/null +++ b/main.c @@ -0,0 +1,34 @@ +// +// Created by zhang on 2024/12/8. +// +#include +#include +#include +#include "function.h" +#include "myerror.h" +#include "extern.h" + +int main() { + SetConsoleOutputCP(65001); + int isStudent; + while (true) { + fprintf(stdout, "欢迎进入口算系统!\n\n输入1以登录\n输入2以注册"); + int x; + scanf("%d", &x); + if (x == 1) { + isStudent = Login(); + if (isStudent == 1 || isStudent == 0)break; + if (isStudent == -1)continue; + } else if (x == 2) { + //UserSignin(); + clear(); + } else { + //Error_Invalid_input(); + } + } + if (isStudent) { + //StudentsDesktop(); + } else { + //TeachersDesktop(); + } +}