#include <stdio.h> int main(void) { int result[100]; int num, i = 0, j; printf("Please enter a number : "); scanf("%d", &num); while(num) { result[i++] = num % 2; num = num / 2; } for(j = i - 1; j >= 0; j--) { printf("%d", result[j]); } printf(" "); return 0; }