65.9K
CodeProject is changing. Read more.
Home

Amusing C++: funny tricks

starIconstarIconstarIconemptyStarIconemptyStarIcon

3.00/5 (2 votes)

Nov 1, 2011

CPOL
viewsIcon

14128

Try this one://Can we print all integers from 1 to 30??/int x = 0;while (x < 30){ _tprintf(_T("X = %d\n"), ++x);}

Try this one:

//Can we print all integers from 1 to 30??/
int x = 0;
while (x < 30)
{
  _tprintf(_T("X = %d\n"), ++x);
}