>>6
ごめんなさい、微妙に間違えてた。

static double G = 9.8;
static double dt = 30/1000;

double vec;
int y;

while(1)
{
    vec += G*dt;
    y += (int)vec;
}

でした。