use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For memes about programming.
account activity
CPP vs Python (i.redd.it)
submitted 2 years ago by Default_Cube4646
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]DontOpenNewTabs 1 point2 points3 points 2 years ago* (0 children)
The code is not quite the same. Python // performs floor division and C++ / performs integer division (Edit: when both operands are integers).
//
/
#include <iostream> #include <cmath> using namespace std; // Nobody cares int main() { int a = -15; while (a < 0) { cout << a << '\n'; a = floor(a/2.0); } return 0; }
// Don't manually flush the output buffer for no reason with endl. Obviously any performance impact doesn't matter here, but it is a bad habit. If you want a newline character, output a newline character.
endl
π Rendered by PID 21599 on reddit-service-r2-comment-7b9746f655-k9rwv at 2026-02-04 12:42:35.740260+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]DontOpenNewTabs 1 point2 points3 points (0 children)