Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 38383

Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.

8 votes
Accepted

Finding the average, the five smallest, and the five largest numbers in an array

There are a number of built-in functions in PHP that would make your code shorter and more direct. The first is implode. implode takes and optional glue string and an array of values, and joins them …
cbojar's user avatar
  • 2,732
7 votes
Accepted

It's almost Friday, right?

Here are a few critiques. /** * Get's input safely and stores the input in the instances members */ void Date::getInput() { std::cout << "Enter the month (1-12): "; month = getSanitizedNum(); …
cbojar's user avatar
  • 2,732
4 votes

Beautifying Dates

Three points to make beyond what was already said (and I strongly recommend you follow what was already said as well). First, you ask for a day with a leading zero, then remove the leading zero. Bett …
cbojar's user avatar
  • 2,732
6 votes

Finding average of eight immediate neighbors of a matrix

Everything Jeroen Vannevel said, plus the following: Use guard clauses Instead of using if/else { /* the rest of the program */ } structures, write out those conditions as guard clauses, more like i …
cbojar's user avatar
  • 2,732