Answers for "while loop forever C++"

C++
1

do while loop c++ loops continuously

//vars
int A; //any variable will do

// loop
do {
  A = 0; // clearing last input from last looping
  cout << "request value for A";
  cin >> A;
  
}
while (A != 'any value other than zero');
Posted by: Guest on October-15-2020
0

c++ while loop example

int i = 1;
while (i < 6) {
  cout << i << "n";
  i++;
}
Posted by: Guest on May-31-2021

Browse Popular Code Answers by Language