function to print overflow / filled / underflow accordingly
void check_and_print ( float required_time , float given_time ) { if ( required_time < given_time ) cout << " Overflow " ; else if ( required_time > given_time ) cout << " Underflow " ; else cout << " Filled " ; }