最赞回答 / HyoVision
因为括号内的int 是你强制转换的类型。比如:1. double num = 2.4;2. int numtwo=(int) num;line 1里num是double,line 2 强制转换为 int 然后赋值于numtwo。试试print看看结果~
2018-08-09
最新回答 / 慕九州0592757
#include <stdio.h>int main(){ int height = 175; //身高为175cm double money = 1500000; //银行存款为150万 printf("是否符合条件:%d\n", height>180&&money>=1000000 ); //填写算式 return 0; }
2018-08-09
最新回答 / 123good
我觉得首先要明白float是指单精度实型,double是指双精度实型。float变量和double变量所接收的实型常量的有效数字是不同的。一般而言,double型变量可以接收实型常量的16位有效数字,float型变量可以接收实型常量的7位有效数字,这两个变量是有区别的,我们float是用%f,double型是用%lf.
2018-08-08