在C中使用while循环“获取”中断

问题描述

如果while循环继续进行,则“得到(目的);只是在第一个循环之后被跳过

    while(finish==0){
printf("PASSWORD LAB EL?? WHAT IS IT??\n:");
gets(purpose);
printf("Put lth the length (LESS THAN 2048)\n:");
scanf("%d",&length);
if(length<=2048){
passwords = fopen("password.txt","a");
fprintf(passwords,"%s:\n",purpose);
    for(length; length>0; length--){
        int bruh = rand() % 78;
        printf("%c",words[bruh]);  
        fprintf(passwords,"%c",words[bruh]);
    finish = 1;
    }
}else{
    printf("TOO MUCH LAWL\n\n");
    system("clear");
    finish = 0;
}
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)