#include <stdio.h>


int main() {
    int n,r,i=0;
    int num[100];
    scanf("%d",&n);
    if (n==0) {
        printf("%d",0);
        return 0;
    }

    while(n!=0) {
        r=n%2;
        n=n/2;
        num[i]=r;
        i++;
    }
    while(i--) {
        printf("%d",num[i]);
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: