#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
char cChar;
short int iShort;
int iInt;
float fFloat = 70000;
cChar = (char)fFloat;//:注意要转换的类型需加上括号
iShort = (short)fFloat;
iInt = (int)fFloat;
printf("%c\n", cChar);
printf("%d\n", iShort);
printf("%d\n", iInt);
printf("%f\n", fFloat);
}
07-03
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交