Hello,
[EMAIL PROTECTED] wrote:
> I am using gcc version 3.4.2 (mingw-special) version compiler and the
> following code is not giving expected output.
>
#include
using namespace std;
int main() { double d; cin >> d; cout << d; return 0; }
>
> It gives out a garbage value int output when I g
The first thing I would do is initialize your variable to 0. Then run
the program again, if the returned value is zero. Then you know that
the cin part is not working. If you still get a weird value, then you
are probably exceeding the limits of the double for your compiler. The
size of a doubl
[EMAIL PROTECTED] wrote:
> I am using gcc version 3.4.2 (mingw-special) version compiler and the
> following code is not giving expected output.
>
> include
> using namespaces std;
No surprise, this doesn't even compile. Seriously, you should use
cut'n'paste for code.
> int main() { double d; c
I am using gcc version 3.4.2 (mingw-special) version compiler and the
following code is not giving expected output.
include
using namespaces std;
int main() { double d; cin >> d; cout << d; return 0; }
It gives out a garbage value int output when I give 2.22507e-308 as
input value to read.
Re