Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){int t,i;for(;;){scanf("%d",&t);i=0;for(;t>1;t=!(t&1)?t>>1:t*3+1){printf("%d\n",t);}printf("%d\n\n",t);}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement