#include<stdio.h> void Conversion(int n){ if(n==0){ //printf("%d",0); return; }else{ Conversion(n/2); printf("%d",n%2); } } int main(){ int n; printf("请输入一个数:"); scanf("%d",&n); Conversion(n); }原文链接:https://www.f2er.com/datastructure/382483.html
#include<stdio.h> void Conversion(int n){ if(n==0){ //printf("%d",0); return; }else{ Conversion(n/2); printf("%d",n%2); } } int main(){ int n; printf("请输入一个数:"); scanf("%d",&n); Conversion(n); }原文链接:https://www.f2er.com/datastructure/382483.html