long cosine(int ang)
{
int x,y;
long tmp,count=0;
if(ang > 900) ang = 900 -(ang - 900);
for(x=0;x<30;x++)
{
y += 2;
tmp = ReadTable(y);
if(ang == 30)
{
count += tmp;
count = 4000 - count;
return count;
}
if(ang < 30)
{
count += (tmp/30)* ang;
count = 4000 - count;
return count;
}
count += tmp;
ang -= 30;
}
return 0;
}