0
点赞
收藏
分享

微信扫一扫

C语言--超级简单的菜单功能演示

老罗话编程 2022-02-06 阅读 62
c语言
#include<stdio.h>
#include<windows.h>
void showmenu()
{
	printf("----这是菜单----\n");
	printf("1-进入函数\n");
	printf("0-退出函数\n");
}
void hanone()
{
	printf("这是函数一\n");
	system("pause");
	return;
}
int main()
{
	int select; 
	while(1)
	{
		showmenu();
		scanf("%d",&select);
		switch(select)
		{
			case 1:hanone();break;
			case 0:exit(0);
		}
		system("cls");
	}
	
} 
举报

相关推荐

c++超级简单的小游戏(下)

0 条评论