List comprehensions: Difference between revisions

m (Fixed lang tags (using MediaWiki::API).)
Line 43:
 
=={{header|C++}}==
There is no equivalent construct in C++. The code below uses three nested loops and an ''if'' statement:
 
<lang cpp>#include <vector>
#include <cmath>
Line 74 ⟶ 76:
}
}
</lang>
 
This produces the following output:
'''3 4 5 5 12 13 6 8 10 8 15 17 9 12 15 12 16 20</lang>'''
 
=={{header|Clojure}}==
Anonymous user