<<< if-else example | Index | Iteration (while loop) cont. >>> |
The world's first "real program" running on a stored-program computer (David Wheeler, Cambridge, May 6, 1949)
// calculate and print a table of squares 0-99: int main() { int i = 0; while ( i < 100 ) { cout << i << '\t' << square( i ) << '\n'; ++i ; // increment i } }
No, it wasn't actually written in C++ :-)
<<< if-else example | Index | Iteration (while loop) cont. >>> |