-
September 13th, 2009, 10:25 PM
#1
c++ question
i do not know why but when I try and calculate 4.2 million and 5000 it gives me -884901888. i am using dev-c++ 4.9.9.2 as my compiler.
here is my code
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int blocks = 2400000;
int weight = 5000;
int total;
total = blocks * weight;
cout << "Weight is: " << total << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
Similar Threads
-
By jm459 in forum Tech Humor
Replies: 1
Last Post: April 14th, 2004, 01:41 PM
-
By Fasheezy in forum Hardware
Replies: 5
Last Post: February 5th, 2004, 04:25 PM
-
By smirc in forum AntiOnline's General Chit Chat
Replies: 6
Last Post: May 13th, 2002, 04:35 PM
-
By smirc in forum AntiOnline's General Chit Chat
Replies: 3
Last Post: May 13th, 2002, 03:24 AM
-
By NetSyn in forum Site Feedback/Questions/Suggestions
Replies: 15
Last Post: May 8th, 2002, 01:45 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|