while() function
Posted: Wed Apr 04, 2012 8:17 pm
while(condition is true)
{
// do something
}
int i=0;
while(i<10)
{
// do something
i++;
}
do
{
// do something
}while(condition);
// notice, you need the semicolon after this while (but not the other)
while(Conditional Statement)
{
do things here while the Conditional Statement is true
}
do
{
do things here
}while(Conditional Statement)