0
any idea
double a=4.0; double b=4.0; double r=a+b; cout>>r; the answer will be 8 how to get it as 8.0
6 Respuestas
+ 1
for this you dont need double...use float
+ 1
or use
double a = 4.0f;
double b = 4.0f;
double r = a + b;
using f after the number to warrant that will be a floating point number...
+ 1
double a = 4.0;
double b = 4.0;
double r = a+b;
cout << (float)r;
0
tnk u ...
0
oops still it's 8 😑
0
Xddddddd