If you bought it from a dealer, take it back at once, it is illegal to drive without a speedo.
The dealer has to fix the car for 6 months after purchase.
If it was a private purchase, unless you were specifically told about it before you closed the deal take it back and tell him/her they will have to fix it or take the car back.