main
pv3e4i5aj 4 days ago
parent 4060adb987
commit 5e536cda4b

60
task1

@ -0,0 +1,60 @@
#include <stdio.h>
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);
}
Loading…
Cancel
Save