Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int in,out;
- scanf("%d",&in);
- if (in>=0 && in<=31)
- {
- out=in%2;
- out+=10*((in/=2)%2);
- out+=100*((in/=2)%2);
- out+=1000*((in/=2)%2);
- out+=10000*((in/=2)%2);
- printf("%d",out);
- }
- else
- printf("Wrong Input");
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement