On Jan 23, 2008 5:50 AM, sudhi chaussalkar <[EMAIL PROTECTED]> wrote:
> #include<iostream.h>
> #include<conio.h>
> void main( )
> {
> int i;
> i=400*400/400;
> cout<<i;
> getch( );
>
> }
I get 400...
You are using a very old compiler, by the way, and may be running into
the limitations of 16-bit integers. You should upgrade to something
modern like Visual C++ Express or wxDev-C++. Here's the code running
under gcc (on Linux):
[EMAIL PROTECTED] ~]$ cat huh.cpp
#include <iostream>
int main( ){
int i;
i=400*400/400;
std::cout << i << std::endl;
}
[EMAIL PROTECTED] ~]$ g++ -o huh huh.cpp
[EMAIL PROTECTED] ~]$ ./huh
400
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi