文章浏览阅读115次。package mainimport "fmt"func sum() int { return 44}func test(x int) int { a := 5 b := 2 return a + b + x}func main() { //todo:示例一 switch后面有一个表达式,case后面有一到多个表达式,前面的case匹配 //到执行了,后面......
<script>var inpus = document.querySelectorAll("input"); inpus[1].onclick = function(){ var num = Number(inpus[0].value); num = parseInt(num/10); switch(num){ case 10: ......
文章浏览阅读1w次,点赞9次,收藏19次。#include<stdio.h>int main(){ int a; printf("请输入一个月份:"); scanf("%d", &a); switch (a) { case 3: case 4: case 5:printf("该月份是春季"); break; case 6: case 7: case 8:printf("该月......