总结一下常用的if else与switch,其中switch中的break知识点是笔试题经常考到的内容. if else与else if 在C语言中,经常使用if else选择语句,来实现很多对应的功能,此部分简单易学,却是基础中的基础.特记录一下,供像我当初一样学编程迷茫的初学者参考. 一 直接使用if-else语句 int num;scanf("%d",&num)if(num==1){ printf("you input is 1\n");}else…
根据传入条件的不同,选择语句会执行不同的语句.下面的例子根据传入的整型变量i的不同而打印不同的内容: switch i { case 0: fmt.Printf("0") case 1: fmt.Printf("1") case 2: fallthrough case 3: fmt.Printf("3") case 4, 5, 6: fmt.Printf("4, 5, 6") default: fmt.Printf("…
php PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages.(像html一样被编辑) PHP 能够生成动态页面内容PHP 能够创建.打开.读取.写入.删除以及关闭服务器上的文件PHP 能够接收表单数据PHP 能够发送并取回 cookiesPHP 能够添加.…