我有一個問題,解決這個問題: 我必須接收數字作爲輸入和第一個數字必須爲0(如果數字爲0關閉循環)但是編譯器讓我把一個號碼作爲輸入,當我按下ENTER它stucks 這裏是我的代碼: #include <stdio.h>
int main(){
int num=0, max=0, first=0, a=0, b=0;
do{
b = num /10;
this is the code source of my program 我在與while循環的問題//而(P!= NULL) 它不工作每當執行reachs循環程序停止工作!儘管P已經初始化,並且p在循環之後不被使用! void Ajout_Debut() {
Q=(Liste*) malloc(sizeof(Liste));
Liste *Q=new Liste();
cout<<"do
如果我嘗試代碼: for i in range(10):
if i < 5:
continue
print(i)
將打印的數字6-10。 但代碼: for i in range(10):
while i < 5:
continue
print(i)
將永不終止。 似乎while循環不增加i。 我在這裏錯過了什麼?