1.基础定义 变量类型在变量名后 var a int var s string 2.定义并赋值 var a,b int = 1,2 var s string="abc" 3.类型推导 不用定义变量类型 var a,b,c,s = 1,2,true,"deduction" 4.简写(只能在函数内) 用":="代替"var" a,b,c,s := 1,2,true,"deduction" 5.定义多个变量并赋值…
#include <stdio.h> int main() { int age; printf("input your age"); scanf("%d",&age); ) { printf("you have become old"); } ) { printf("you are too young"); } else { printf("you are strong"); } } C…