summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--histogram.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/histogram.cpp b/histogram.cpp
index be6ec41..5bb2133 100644
--- a/histogram.cpp
+++ b/histogram.cpp
@@ -136,7 +136,7 @@ int main(int argc,char **argv){
int tally=histogram[i];
int width=BARWIDTH*tally/maxtally;
cout<<fullbar+BARWIDTH-width<<emptybar+width
- <<" ("<<setw(11)<<low+(double)i/nbins*(high-low)<<" - "<<setw(11)<<low+(double)(i+1)/nbins*(high-low)<<")"
+ <<" ["<<setw(11)<<low+(double)i/nbins*(high-low)<<" - "<<setw(11)<<low+(double)(i+1)/nbins*(high-low)<<")]"[i==(int)histogram.size()-1]
<<" ["<<tally<<"]"<<endl;
}
}