stepper motor code on arduino uno stack with motor shield v2.0

with the help on the tutorial

The last time I looked, there were at least two bazillions tutorials on the internet. Which ONE did you follow?

Does anyone know how to write a code so that my stepper motor can rotate from 45 to 90 degree

Well, first you rotate to 45 degrees. That's some undefined number of steps. Then, you step some more until you have rotated 1/4 turn. Then, you wait a while. The blink without delay function shows one way. The other example shows another way.

Then, you step in the other direction some undefined number of steps.

Now the number of steps won't be undefined for you, because you know something about your motor that you didn't share.