Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 26:5c966a0a3e8e
- Parent:
- 25:a42a1ed4d8e9
- Child:
- 27:f51397917a52
--- a/main.cpp Mon Jun 11 14:19:05 2018 +0000 +++ b/main.cpp Mon Jun 11 14:34:34 2018 +0000 @@ -172,6 +172,27 @@ wait(0.2); greenled = 0; } + + +/** + Prints the positions where there is a 0 +**/ + +void printZeros(unsigned int number){ + + /* + bitset <sizeof(unsigned int) * 8> n (number); + + cout << "Binary: " << n << endl; + */ + + for(int i=0; i<16;i++){ + if(~n2 & 1<<i){ + cout << "There is a 0 at " << i << endl; + } + } + + } /**