// Code derived from Stroustrup's PPP2 book// § 4.4.2.3 for-statements// -and beginning on p 112#include<iostream>usingstd::cout;// return the square of xintsquare(intx){returnx*x;}// calculate and print a table of squares 0–99 (twice)intmain(){for(inti=0;i<100;++i)cout<<i<<'\t'<<square(i)<<'\n';//---cout<<'\n';{inti=0;// the for-statement initializer//while(i<100){// the for-statement conditioncout<<i<<'\t'<<square(i)<<'\n';// the for-statement body++i;// the for-statement increment}}}