Histogram problem

whats wrong in my code