code:1234567891011int decToBin(int dec){ int result = 0, temp = dec, j = 1; while (temp) { result += j * (temp % 2); temp = temp / 2; j = j * 10; } return result;}This article was written on 2022/7/10.