#include<stdio.h>
int main() {
//1、自动转换
int a = 10;
//变量a自动提升为double类型
double d = 10.3 + a;
printf("%f\n",d );
//常见的自动转换
float b = 10 + 12.3f; //转换后相当float a = 10.0f + 12.3f;
double c = 10.3f + 5.7; //10.3f转换成double
//2、强制转换
//将3.14转换成整型 3,存放到e里面
int e = 3.14;
printf("%d\n", e);
int e1 = (int)3.14;
//常见的强制转换
char f = 65;
printf("%c\n", f);
int num = 18.9f; //float类型转换成整型
return 0;
}