×

Loading...

my implementation~~

scorpio (scorpio)
void main(int argc, char* argv[])
{
int i, tmp = 1, lcm, lcm2, len = 10;
int *data = new int[len];

for(i = 0; i < len; i++)
data[i] = XXX; // initialize data

for(i = 0; i < len; i ++){
lcm = lcm2 = data[i];

while((lcm / tmp) * tmp != lcm){
lcm += lcm2;
}

tmp = lcm;
}

printf("%d\n", lcm);
}
(#129541@0)
2001-7-12 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 请问最小公被数的英语是什么?如果能有源大妈就更好拉。thanks~~

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT杂谈