0
n = ceil(1234 / (double)1);
cout << n << endl; 

Here output is 1234 but if I write

n = ceil(99999999999999999 / (double)1);
cout << n << endl;

This time I get 100000000000000000 as output. Why this happen?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Imtiaz Mehedi
  • 343
  • 3
  • 11

0 Answers0