Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Considering C++ language, what is the difference between While loop and do...while loop ?

user-image
Question ajoutée par هاشم المشارقة , Key Account Manager , Advanced United Systems Ltd. ( A member of Taj Holding Group)
Date de publication: 2016/02/02

the differnce between while loop and do while loop is simply with a do while loop your program tells the compliler to do whatever you want to first then checking your condtion..

but the while it will check your condtion first

 

for example:

 

while( x !=) {

     x = x+5;

}

do {

x * x;

}while(x!=);

 

 

 

 

 

More Questions Like This