Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. //person enters a binary string value e.g 10001001;
  2. //char userInput[32];
  3. //int value = 0;
  4. //memset( userInput, 0, 32);
  5. //std::cin >> userInput;
  6. //int currentbit = strlen(userinput);
  7. //for( int i = 0; i < strLen(userInput); ++i )
  8. //{
  9. // if( userInput[0] == '1' )
  10. // {
  11. // value += 1 << currentBit;
  12. // }
  13. // currentBit--;
  14. //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement