My dc fan doesnt work when connecting with transistor

"temp" is an int (integer) so multiplying it by 0.48828125 probably isn't going to do what you think.

But if nothing is moving then it's probably that you don't have enough power. What exactly is the power supply you're using? Is the motor powered from the 12V or from the Arduino 5V pin? What is powering the Arduino?

I can't see much from that Fritzing thing (where is the 12V in there?). Can you post a real circuit diagram with details of what components you're using (hand drawn is fine).

Steve