// Problem 6: Decimal to binary conversion #include #include int main(int argc, char* argv[]) { int N; int b5, b4, b3, b2, b1, b0; printf("Enter a number [0-32]: "); scanf("%d", &N); printf("%d in decimal is equal to "); b0=N%2; N/=2; b1=N%2; N/=2; b2=N%2; N/=2; b3=N%2; N/=2; b4=N%2; N/=2; b5=N%2; N/=2; printf("%d%d%d%d%d%d in binary.\n", b5, b4, b3, b2, b1, b0); system("pause"); return 0; }