while loop with functions c++ code example Example: how to define a while statement in c++ while(condition) { statement(s); }