From 5e536cda4be68c7d0f343f6656dbcb7bb19d1cc7 Mon Sep 17 00:00:00 2001 From: pv3e4i5aj Date: Sun, 17 Nov 2024 14:55:49 +0800 Subject: [PATCH] Add task1 --- task1 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 task1 diff --git a/task1 b/task1 new file mode 100644 index 0000000..7b925d4 --- /dev/null +++ b/task1 @@ -0,0 +1,60 @@ +#include +void Show_The_Main_interface() +{ + //显示主界面 + for(int i=1;i<=30;i++) + { + printf(" "); + } + printf("1.Input\n"); + for(int i=1;i<=30;i++) + { + printf(" "); + } + printf("2.Output\n"); + for(int i=1;i<=30;i++) + { + printf(" "); + } + printf("3.Order\n"); + for(int i=1;i<=30;i++) + { + printf(" "); + } + printf("4.Quit\n"); +} + +void Output_Prompts(char choice) +{ + //输出提示信息 + if(choice=='i') + { + printf("You are trying to Input info\n"); + } + else if(choice=='o') + { + printf("You are trying to Output info\n"); + } + else if(choice=='m') + { + printf("You are trying to Make things ordered\n"); + } + else if(choice=='q') + { + printf("You are about to Quit\n"); + } + else + { + printf("Wrong input\n"); + } +} +int main() +{ + //显示主界面 + Show_The_Main_interface(); + //用户输入 + char choice; + scanf("%c",&choice); + //输出提示信息 + Output_Prompts(choice); +}