I wrote simple code in C language (without libraries), but the result is good only when you read it from right to left, how to reverse it? I want the most simplified code as it is possible. My code below:
#include <stdio.h>
int main() {
    int number;
    printf("Changes from decimal to binary\n");
    printf("Enter the number: ");
    scanf("%d",&number);
    do{
        if(number % 2 == 1){
            printf("1");
        }else{
            printf("0");
        }
        number = number / 2;
    }
     while(number>0);
  return 0;
}
 
     
     
     
    