Skip to content
-
Number System In C
Method 1 – Using loops #include <stdio.h> int main() { int OCTALVALUES = {0, 1, 10, 11, 100, 101, 110, 111}; long long octal, tempOctal, binary, place; int rem; printf("Enter any Octal number: "); scanf("
-
Number System In C
Method 1 #include <stdio.h> int main() { int octalConstant = {0, 1, 10, 11, 100, 101, 110, 111}; long long binary, octal, tempBinary; int digit, place, i; octal = 0; place= 1; /* Input binary number from user */ printf("Enter any binary number: "); scanf("%lld", &binary); /* Co
-
Number System In C
Method 1 #include <stdio.h> #include <string.h> int main() { int hexConstant = {0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111}; long long binary, tempBinary; char hex; int index, i, digit; /* Input binary number from user */ printf("Ente