In terms of yourself, go to the GP first thing tomorrow or see some kind of doctor ASAP - coughing up blood is never, ever good (not only does it mean you have cuts somewhere in your airways, you could develop horrible things like infections or pleurisy or something) so if it continues rush yourself to A&E.
Don't worry about the exams - if it's nothing serious you will have missed a few lessons tops. If it is something serious you can claim extra marks back and your healt is far more important than your exams!
As for your blood, you have GOT to phone up the blood people and tell them your problem - coughing lots is more than a "minor cold" and so your blood could seriously infect someone else, particularly if their immune system is down already. And even if the doctor says it's nothing, at least you didn't expose anyone to anything. Much rather a pint of blood wasted than a life.