Answers for "how to do a do while loop in c++"

C++
2

do while in c++

do {
  // code here
}
while (condition);
// examples
#include <iostream>
using namespace std;
int main () {
  int i = 0;
	do {
  cout << i << "n";
  i++;
		}
	while (i < 10);
}
Posted by: Guest on October-29-2021
1

c++ while loop code

while(/*Expression*/){
 //Statements go here
}
Posted by: Guest on April-18-2020

Browse Popular Code Answers by Language