// Code derived from Stroustrup's PPP2 book// § 4.4.2.1 while-statements// -and beginning on p 109#include<iostream>usingstd::cout;// return the square of xintsquare(intx){returnx*x;}// calculate and print a table of squares 0–99intmain(){inti=0;// start from 0while(i<100){// the loop condition testing the loop variable icout<<i<<'\t'<<square(i)<<'\n';++i;// increment i (that is, i becomes i+1)}}