Content deleted Content added
Add c++ |
|||
Line 51:
int main() {
const int N = 11; // in C++11, can be declared as "constexpr auto N = 11;"
int S[N]; // in C++11, can be declared as "std::array<int, N> S;"
for(int i = 0; i < N; ++i) {
Line 59:
std::reverse(S, S+N); // in C++11, can be used as "std::reverse(begin(S), end(S));"
for(int i = 0; i < N; ++i) { // in C++11, can be used as "for(auto i : S)
double y = f(i);
if(y > 400) {
Line 70:
}
</syntaxhighlight>
==References==
* "The Early Development of Programming Languages" in ''A History of Computing in the Twentieth Century'', New York, Academic Press, 1980. ISBN 0-12-491650-3 (Reprinted in Knuth, Donald E., ''et al.'', ''Selected Papers on Computer Languages'', Stanford, CA, CSLI, 2003. ISBN 1-57586-382-0) [http://www.textfiles.com/bitsavers/pdf/stanford/cs_techReports/STAN-CS-76-562_EarlyDevelPgmgLang_Aug76.pdf (typewritten draft, August 1976)]
|