0

This is my double:

double determinant = 2.8*5*-9.5;


It should print out -133, right?

It prints out some weird junk like: 1.8e + 04


How can I correct this?

3
Contributors
8
Replies
9
Views
11 Years
Discussion Span
Last Post by server_crash
0

It works for me:

#include <iostream>
using namespace std;
int main()
{
		double determinant = 2.8*5*-9.5;
		cout << "determinant = " << determinant<<endl;
		return 0;
}

./Temp
determinant = -133
0

I'm using an older version of Bloodshed. I guess that could be the problem...... But if it works, then I will be extremememememmeemlllllyyyyyy happy.

0

Alright, it worked. Thanks for all the help guys.

PS: Why would a compiler have problems with a double like that?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.