0

what is do while function give a program for it

31st Aug 2016, 2:18 PM
abhishek nagar
abhishek nagar - avatar
2 Respostas
+ 2
A do/while loop functions exactly the same as a regular while loop. The only difference is, is that a do/while loop is always garunteed to run at least once. Syntax: do { //loop code } while (/*condition*/);
31st Aug 2016, 2:28 PM
Cohen Creber
Cohen Creber - avatar
0
#include<iostream> using namespace std; int main() { int i,n; n=4; i=0; do { cout<<n; i++; } while(i<n); }
1st Sep 2016, 4:37 PM
kalar oneone
kalar oneone - avatar