Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void decimalToBinary(int number);
- int main()
- {
- decimalToBinary(14);
- return 0;
- }
- void decimalToBinary(int number)
- {
- if(number != 0)
- {
- decimalToBinary(number / 2);
- printf("%d", number % 2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment