Skip to content
Snippets Groups Projects
Commit 51227d70 authored by Vipin Thomas's avatar Vipin Thomas
Browse files

Update pixel.cpp

parent 687e8c26
No related branches found
No related tags found
No related merge requests found
......@@ -78,4 +78,13 @@ long long toAscii(int c) {
return bin;
}
int convertBinInt(long long n) {
int dec = 0, i = 0, rem;
while (n != 0) {
rem = n % 10;
n /= 10;
dec += rem * pow(2, i);
++i;
}
return dec;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment