Advertisement
thinhckhcmus

Chuyển Đổi Cơ Số 2 Sang 10 ( dịch trái )

Oct 9th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. int BintoDec(int b[32], int n)
  2. {
  3. int x = 0;
  4. for (int i = 0; i < n; ++i)
  5. {
  6. x = x + (b[i] << x - i - 1);
  7. }
  8. return x;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement