upto n - ( x % n ) the values will be x / n after that the values will be x / n + 1
int zp = n - ( x % n ) ; int pp = x / n ; for ( int i = 0 ; i < n ; i ++ ) { if ( i >= zp ) cout << ( pp + 1 ) << " ▁ " ; else cout << pp << " ▁ " ; } } }