这段代码给我创造了一个无限循环我想按照一些步骤让数字首次亮相为 0 并打印程序执行它需要多少步骤
int debut,i;
printf("de (>= 1) ? ");
do
{
scanf("%d",&debut);
}
while (debut < 1);
int fin;
printf("a >= << << ) ? ");
do
{
scanf("%d",&fin) ;
}
while (fin < debut);
for (;debut<=fin;debut++){
i=0;
while(debut!=0)
{
if(debut%3==0)
{
debut+=4;
}
else if (debut%3!=0 && debut%4==0){
debut/=2;
}
else if (debut%3!=0 && debut%4!=0)
{
debut-=1;
}
i+=1;
}
printf("%d\n->%d",debut,i);
}