CODE:int x1=11, x2=10;
double y;
double x1t=x1, x2t=x2;
y=x1t/x2t;
textout(1, 100, 500, "y = "+dsc(y), 1);
sleep (5000);
function dsc(double z)
{
string q=format(z);
int a=size(q);
char g[64];
strcpy(#g[0], q);
q="";
for (int i=0; i<a-2; i++)
{
q=q+g[i];
if (g[i]=='.')goto df;
}
df: q=q+g[i+1];
q=q+g[i+2];
return q;
}
|