Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int toBinary(int value) {
  6. if (value == 0)
  7. return 0;
  8. else
  9. return (value % 2 + 10 * toBinary(value / 2));
  10. }
  11.  
  12. /*int sum(LList L1, LList L2) {
  13. if (L1 == 0 || L2 == 0)
  14. return 0;
  15. return L1.value + L2.value + sum(L1.link, L2.link);
  16. }*/
  17.  
  18. /*int main() {
  19. //cout << toBinary(69);
  20.  
  21. system("pause");
  22. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement