switch( )的经典引用
生活随笔
收集整理的这篇文章主要介绍了
switch( )的经典引用
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
switch( )的经典引用:#include<stdio.h>int main()
{int i;do{printf("按1,流量查询\n");printf("按2,人工服务\n");printf("按3,密码修改\n");printf("按4,套餐信息\n");printf("按0,退出系统\n");scanf("%d",&i);switch(i){case 1: printf("流量查询\n\n");break;case 2: printf("人工服务\n\n");break;case 3: printf("密码修改\n\n");break;case 4: printf("套餐信息\n\n");break;case 0: printf("退出系统\n\n");break;default: printf("输入有误,请重新输入\n\n");break;}}while(i);return 0;
}
总结
以上是生活随笔为你收集整理的switch( )的经典引用的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: mktime函数实现获取当前系统时间
- 下一篇: 用C语言实现控制台模拟显示时