int,float和double类型;char类型和char数组(字符串);printf和scanf

1,int,float和double类型 int i; int j , k ; (同时声明多个) int age=18 ; (声明的同时赋值) int Alan, Aloe = 18 ; (声明与同时赋值) float f ; float q , money ; (同时声明多个) float w = 1.8; (声明的同时赋值) 2, char 类型和char数组: char c ; char zh,text ; char letter = 'A' ; char c[20] = {'H','e','l','l','o','','w','o','r','l','d','\0'}; char name[] = {'A','l','a','n'}; (name后的[ ]可以是空的,电脑自己会计算字符的个数) 3,printf和scanf printf("Alan的年龄是%d", age ); scanf("%d", &i);
posted @ 2020-06-09 21:40  ALOE218  阅读(387)  评论(0编辑  收藏  举报