using namespace std; bad habit
efficiency can be improved, at the cost of being readable, and there isnt any point in speeding up nearly instant code that has no real value (its homework, you learned from it, but it does not need to run 5000 times a second does it?) after you have coded it.
one example of speed is to generate an output string rather than cout over and over, and dump the string at the end.
if you did that ^^ a second example is you can make top and bottom half at the same time in a single loop, doing 1/2 the work. you can do that into an output string because you can write anywhere inside it at any time, but the console is one line at a time no going back (well, with standard tools, there are ways) so you can't do that as cleanly.
but I ask again, do you really care? Nothing you have is directly inefficient (bad code) in any major way (maybe small things if you want to get really deep on it).
little thing:
consider
1 2 3 4 5
|
rowCount--; //The middle row was accounted for in the top half
//Bottom half of diamond
//Moves down through the rows
for (int count = rowCount-1; count >= 1; count--)
|
issue:
double rowCount = round(rows / 2.0);
why is rowcout a double ?! I see no reason and if int, round becomes pointless as well.
top and bottom code are so close you could have made them a function, but having already said you could make that one loop instead of 2, the redundancy goes away, so meh.