Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
11933
//g++ 5.4.0 #include <iostream> #include <bitset> using namespace std; int main() { bitset<12> mibit, a, b; int numero; while(cin>>numero and numero!=0){ a.reset(); b.reset(); mibit.reset(); mibit=numero; for(int i=0;i<12;i++){ if(i%2==0)a[i]=mibit[i]; else b[i]=mibit[i]; } cout<<mibit<<"\n"<<a<<"\n"<<b<<"\n"; //cout<<a.to_ulong()<<" "<<b.to_ulong()<<"\n"; } //cout<<mibit; }
run
|
edit
|
history
|
help
0
weak_ptr and Circle_reference
MyStack
Continuous Sub Set with given sum
Palindrome
remove_if_30-Seconds-of-C++
CIDP2k19
Double_wrapper gcc
idfc
fibonacci
Handling new types without using RTTI