|  | 
|  | 
| вернуться в форум | Why is that wrong on the first test #include <iostream>#include <cmath>
 
 void rSqrt(void)
 {
 unsigned long int n = 0;
 if (scanf("%lu", &n) != -1)
 ¦  rSqrt();
 else
 ¦   return;
 printf("%.4f\n", sqrt(n));
 return;
 }
 
 int main()
 {
 rSqrt();
 return 0;
 }
Re: Why is that wrong on the first test C and C++ programs are compiled on the server with the 32-bit Microsoft Visual C++ 2017 or MinGW GCC 7.1 or Clang 4.0.1.
 So, sizeof(unsigned long)==4.
 
 Edited by author 23.10.2018 19:03
 | 
 | 
|