GooseterV / Project-Euler

Found the usage of undeclared variables JS-0125
Bug risk
Critical
a year agoa year old
'i' is not defined
10function main() {
11	let count = 1;
12	for (let j = 1; j <= 20; j++) {
13		count *= Math.floor(i / gcd(i, count));14	};
15	return count;
16};
'c' is not defined
 2	while (b != 0) {
 3		c = a % b;
 4		a = b;
 5		b = c; 6	}
 7	return a;
 8}
'c' is not defined
 1function gcd(a, b) {
 2	while (b != 0) {
 3		c = a % b; 4		a = b;
 5		b = c;
 6	}
'i' is not defined
10function main() {
11	let count = 1;
12	for (let j = 1; j <= 20; j++) {
13		count *= Math.floor(i / gcd(i, count));14	};
15	return count;
16};
'i' is not defined
 1function smallestFactor(x) {
 2	for (i = 2; i <= Math.floor(x**.5); i++) { 3		if (x % i == 0) {
 4			return i;
 5		};