skabdulravoof
MIS
is there any difference between
double (i*j)
(double) i*j
thanks for ur time
double (i*j)
(double) i*j
thanks for ur time
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <limits>
#include <iostream>
...
const int maxint = numeric_limits<int>::max();
...
double bad = double(i*j);// integer overflow!..
double ok = (double)i*j; // same as ((double)i)*j...
cout << bad << " " << ok << endl;