QRAP: a numerical code for projected (Q)uasiparticle (RA)ndom (P)hase approximation. A computer code for quasiparticle random phase approximation (QRPA) and projected quasiparticle random phase approximation (PQRPA) models of nuclear structure is explained in detail. The residual interaction is approximated by a simple $delta $-force. An important application of the code consists in evaluating nuclear matrix elements involved in neutrino-nucleus reactions. As an example, cross sections for $^{56}$Fe and $^{12}$C are calculated and the code output is explained. The application to other nuclei and the description of other nuclear and weak decay processes are also discussed.