switch
来源:互联网 发布:唐诗逸 知乎 编辑:程序博客网 时间:2024/04/27 23:05
#include<stdio.h>int main(){ int x; printf(" 请输入一个数字:"); scanf("%d",&x); switch(x) { case 1 :printf("某某内容\n"); break; case 2 :printf("某某内容\n"); break; default:printf("......!!"); } return 0;}
测试结果:
知识点 :switch 的使用
个人总结:由于 之前粗心 scanf x前面没加&导致程序 一直崩溃 细节 很重要
阅读全文
0 0
- switch
- Switch
- Switch
- switch
- switch
- switch
- Switch
- switch
- switch
- switch
- SWITCH
- Switch
- switch
- switch
- switch
- (switch)
- switch
- switch
- 强化学习(四) ----- 蒙特卡罗方法(Monte Carlo Methods)
- hdu1220 Cube
- Learning Python Part IV 之 属性继承搜索(Attribute Inheritance Search)
- 04-树5 Root of AVL Tree(25 分)
- ubuntu16.04下安装Matlab
- switch
- 生活小记33
- JavaScript 开发人员需要知道的简写技巧
- 用冒泡法给数组排序
- Android日常总结
- 实习记录6 gdb调试
- 新手村 循环 数字反转
- 强化学习(五)----- 时间差分学习(Q learning, Sarsa learning)
- Writeup of BlueDon CTF's MISC-1:杂项全家桶