Revision history of "C Language Practice: Binary to Hexagonal Numbers"

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

  • curprev 21:46, 9 March 2022‎ Eric talk contribs‎ 1,243 bytes +1,243‎ Created page with "== Convert Binary to Hexagonal == <syntaxhighlight lang="c" line style="border: 1px dashed red;"> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int btod(char *b) { int i; int decimal = 0; int place = 0, temp = 0; for(i = strlen(b) - 1; i >= 0; i--) { if ((b[i] == '0') || (b[i] == '1')) { temp = b[i] - '0'; } else { printf("error: not a valid binary numbe..."