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); +}