#include<stdio.h> int main() { printf("%d",int(3.5)); return 0; }
在vscode上运行会报错如下
应该修改为(int)(3.5),这种写法才符合C语言的规则!即强制转换类型!