Advertisement
mercMatvey4

Untitled

Nov 29th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1.   for (int i = 0; i < 8; i++)
  2.         {
  3.             fraction *= 8;
  4.             double q = (int)fraction;
  5.             frac_res += q * (1/pow(8,i+1));
  6.             fraction -= q;
  7.         }
  8.         result = int_res + frac_res;
  9.         cout << result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement