lili83xu's solution is perfect! What I added is nothing new - just to make sure C is set to missing when it is supposed to be so.
---------------------------------------------
data b(keep=t C);
set a;
lag_B=lag(B);
if t=lag(t)+1 then C=A/lag_B;
else C=.;
run;