If both 4 s and 7 s are there in digit sum , we subtract a 4.
else { a ++ ; sum -= 4 ; } } if ( sum < 0 ) { document . write ( " " ) ; return ; } for ( i = 0 ; i < a ; i ++ ) document . write ( " " ) ; for ( i = 0 ; i < b ; i ++ ) document . write ( " " ) ; document . write ( ) ; }