Loop, Infinite loop, and flag
Debug > more bug > repeat
Loop
while loop
#include<iostream>
using namespace std;
int main () {
int A = 0;
while (A<10) {
cout << "Doing this for "<< ++A <<" round"<<endl;
}
cout << "Program end"<<endl;
return 0;
}for loop
Infinite loop
แล้วทั้งสองแบบแตกต่างกันอย่างไร ในภาษา C/C++
Flag
Last updated
Was this helpful?