Energy and angular distributions of energic flare electrons and their X-radiation