3.若有以下程序段,int c1=1,c2=2,c3; c3=1.0/c2*c1 则执行后,c3中的值是
人气:311 ℃ 时间:2020-03-28 11:31:46
解答
结果是0,编译器会把结果0.5强制转换为int型,丢失小数部分
推荐
- int c1=1,c2=2,c3; c3=1.0/c2*c1; c3的值为什么等于0呢?
- #include main() { int a,b,c1,c2,c3,c4; scanf("%d,%d",&a,&b); if (b 0); c1 = a+ b; c2 =
- 驾照C1;C2;C3;C4;C5;有什么区别 C1是C照里最高的吗
- #includeusing namespace std; int main() {char c1='a',c2='b',c3='c',c4='\101',c5='\116';
- 驾驶证a1 a2 b2 c1 c2 c3 分别是什么车?
- 化简[(3a-4b)(-3a-4b)-(4b-3a)²-3a(1/3ab²+a-b)]÷(-3a)
- She ate some dumplings for breakfast. She ( ) ( ) ( ) dumplings for breakfast(句型转换)
- 《钢铁是怎样炼成的》章节的小标题
猜你喜欢